cryptol-2.5.0: Cryptol: The Language of Cryptography

Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Cryptol.ModuleSystem.Env

Description

 

Synopsis

Documentation

data ModuleEnv Source #

Instances

Generic ModuleEnv Source # 

Associated Types

type Rep ModuleEnv :: * -> * #

NFData ModuleEnv Source # 

Methods

rnf :: ModuleEnv -> () #

type Rep ModuleEnv Source # 

data CoreLint Source #

Constructors

NoCoreLint

Don't run core lint

CoreLint

Run core lint

Instances

Generic CoreLint Source # 

Associated Types

type Rep CoreLint :: * -> * #

Methods

from :: CoreLint -> Rep CoreLint x #

to :: Rep CoreLint x -> CoreLint #

NFData CoreLint Source # 

Methods

rnf :: CoreLint -> () #

type Rep CoreLint Source # 
type Rep CoreLint = D1 (MetaData "CoreLint" "Cryptol.ModuleSystem.Env" "cryptol-2.5.0-62ntwDPh16AFY461fF3rK" False) ((:+:) (C1 (MetaCons "NoCoreLint" PrefixI False) U1) (C1 (MetaCons "CoreLint" PrefixI False) U1))

focusModule :: ModName -> ModuleEnv -> Maybe ModuleEnv Source #

Try to focus a loaded module in the module environment.

loadedModules :: ModuleEnv -> [Module] Source #

Get a list of all the loaded modules. Each module in the resulting list depends only on other modules that precede it.

focusedEnv :: ModuleEnv -> (IfaceDecls, NamingEnv, NameDisp) Source #

Produce an ifaceDecls that represents the focused environment of the module system, as well as a NameDisp for pretty-printing names according to the imports.

XXX This could really do with some better error handling, just returning mempty when one of the imports fails isn't really desirable.

dynamicEnv :: ModuleEnv -> (IfaceDecls, NamingEnv, NameDisp) Source #

The unqualified declarations and name environment for the dynamic environment.

qualifiedEnv :: ModuleEnv -> IfaceDecls Source #

Retrieve all IfaceDecls referenced by a module, as well as all of its public and private declarations, checking expressions

newtype LoadedModules Source #

Invariant: All the dependencies of any module m must precede m in the list.

Constructors

LoadedModules 

data LoadedModule Source #

Constructors

LoadedModule 

Fields

data DynamicEnv Source #

Extra information we need to carry around to dynamically extend an environment outside the context of a single module. Particularly useful when dealing with interactive declarations as in :let or it.

Constructors

DEnv 

deIfaceDecls :: DynamicEnv -> IfaceDecls Source #

Build IfaceDecls that correspond to all of the bindings in the dynamic environment.

XXX: if we ever add type synonyms or newtypes at the REPL, revisit this.