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.Monad

Description

 

Synopsis

Documentation

data ModuleError Source #

Constructors

ModuleNotFound ModName [FilePath]

Unable to find the module given, tried looking in these paths

CantFindFile FilePath

Unable to open a file

OtherIOError FilePath IOException

Some other IO error occurred while reading this file

ModuleParseError FilePath ParseError

Generated this parse error when parsing the file for module m

RecursiveModules [ImportSource]

Recursive module group discovered

RenamerErrors ImportSource [RenamerError]

Problems during the renaming phase

NoPatErrors ImportSource [Error]

Problems during the NoPat phase

NoIncludeErrors ImportSource [IncludeError]

Problems during the NoInclude phase

TypeCheckingFailed ImportSource [(Range, Error)]

Problems during type checking

OtherFailure String

Problems after type checking, eg. specialization

ModuleNameMismatch ModName (Located ModName)

Module loaded by 'import' statement has the wrong module name

DuplicateModuleName ModName FilePath FilePath

Two modules loaded from different files have the same module name

data RO Source #

Constructors

RO 

Fields

newtype ModuleT m a Source #

Instances

MonadT ModuleT Source # 

Methods

lift :: Monad m => m a -> ModuleT m a #

Monad m => Monad (ModuleT m) Source # 

Methods

(>>=) :: ModuleT m a -> (a -> ModuleT m b) -> ModuleT m b #

(>>) :: ModuleT m a -> ModuleT m b -> ModuleT m b #

return :: a -> ModuleT m a #

fail :: String -> ModuleT m a #

Monad m => Functor (ModuleT m) Source # 

Methods

fmap :: (a -> b) -> ModuleT m a -> ModuleT m b #

(<$) :: a -> ModuleT m b -> ModuleT m a #

Monad m => Applicative (ModuleT m) Source # 

Methods

pure :: a -> ModuleT m a #

(<*>) :: ModuleT m (a -> b) -> ModuleT m a -> ModuleT m b #

(*>) :: ModuleT m a -> ModuleT m b -> ModuleT m b #

(<*) :: ModuleT m a -> ModuleT m b -> ModuleT m a #

MonadIO m => MonadIO (ModuleT m) Source # 

Methods

liftIO :: IO a -> ModuleT m a #

Monad m => FreshM (ModuleT m) Source # 

Methods

liftSupply :: (Supply -> (a, Supply)) -> ModuleT m a Source #

io :: BaseM m IO => IO a -> ModuleT m a Source #

interactive :: ModuleM a -> ModuleM a Source #

Push an "interactive" context onto the loading stack. A bit of a hack, as it uses a faked module name

getImportSource :: ModuleM ImportSource Source #

Get the currently focused import source.

unloadModule :: FilePath -> ModuleM () Source #

Remove a module from the set of loaded module, by its path.

withPrependedSearchPath :: [FilePath] -> ModuleM a -> ModuleM a Source #

Run a ModuleM action in a context with a prepended search path. Useful for temporarily looking in other places while resolving imports, for example.