cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright(c) 2013-2015 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Cryptol.ModuleSystem.Base

Description

 

Synopsis

Documentation

renameModule :: Module -> ModuleM Module Source

Rename a module in the context of its imported modules.

renameExpr :: Expr -> ModuleM Expr Source

Rename an expression in the context of the focused module.

renameDecls :: (Rename d, FromDecl d) => [d] -> ModuleM [d] Source

Rename declarations in the context of the focused module.

noPat :: RemovePatterns a => a -> ModuleM a Source

Run the noPat pass.

loadModuleByPath :: FilePath -> ModuleM Module Source

Load a module by its path.

loadImport :: Located Import -> ModuleM () Source

Load the module specified by an import.

loadModule :: FilePath -> Module -> ModuleM Module Source

Load dependencies, typecheck, and add to the eval environment.

fullyQualified :: Import -> Import Source

Rewrite an import declaration to be of the form:

import foo as foo [ [hiding] (a,b,c) ]

importIface :: Import -> ModuleM Iface Source

Process the interface specified by an import.

importIfaces :: [Import] -> ModuleM IfaceDecls Source

Load a series of interfaces, merging their public interfaces.

findModule :: ModName -> ModuleM FilePath Source

Discover a module.

findFile :: FilePath -> ModuleM FilePath Source

Discover a file. This is distinct from findModule in that we assume we've already been given a particular file name.

addPrelude :: Module -> Module Source

Add the prelude to the import list if it's not already mentioned.

loadDeps :: Module -> ModuleM () Source

Load the dependencies of a module into the environment.

checkExpr :: Expr -> ModuleM (Expr, Schema) Source

Typecheck a single expression.

checkDecls :: (HasLoc d, Rename d, FromDecl d) => [d] -> ModuleM [DeclGroup] Source

Typecheck a group of declarations.

checkModule :: Module -> ModuleM Module Source

Typecheck a module.

type TCAction i o = i -> InferInput -> IO (InferOutput o) Source

importIfacesTc :: [Import] -> ModuleM IfaceDecls Source

Process a list of imports, producing an aggregate interface suitable for use when typechecking.

genInferInput :: Range -> IfaceDecls -> ModuleM InferInput Source

Generate input for the typechecker.