Monad package:ghc -is:module
Get a unique from a monad that can access a unique supply.
Crucially, because
MonadGetUnique doesn't allow you to get the
UniqSupply (unlike
MonadUnique), an instance such as
UniqDSM can use a deterministic unique supply to return
deterministic uniques without allowing for the
UniqSupply to
be shared.
A monad for generating unique identifiers
Lift a f action into an m action.
An mtl-style class for monads that support parsing-related operations.
For example, sometimes we make a second pass over the parsing results
to validate, disambiguate, or rearrange them, and we do so in the PV
monad which cannot consume input but can report parsing errors, check
for extension bits, and accumulate parsing annotations. Both P and PV
are instances of MonadP.
MonadP grants us convenient overloading. The other option is to have
separate operations for each monad: addErrorP vs addErrorPV, getBitP
vs getBitPV, and so on.
Class that abstracts out the common ability of the monads in GHC to
lookup a
TyThing in the monadic environment by
Name.
Provides a number of related convenience functions for accessing
particular kinds of
TyThing
A monad that has all the features needed by GHC API calls.
In short, a GHC monad
- allows embedding of IO actions,
- can log warnings,
- allows handling of (extensible) exceptions, and
- maintains a current session.
If you do not use
Ghc or
GhcT, make sure to call
initGhcMonad before any call to the GHC API functions can
occur.
Get the monad GHCi lifts user statements into.
Initialise a GHC session.
If you implement a custom
GhcMonad you must call this function
in the monad run function. It will initialise the session variable and
clear all warnings.
The first argument should point to the directory where GHC's library
files reside. More precisely, this should be the output of
ghc
--print-libdir of the version of GHC the module using this API is
compiled with. For portability, you should use the
ghc-paths
package, available at
http://hackage.haskell.org/package/ghc-paths.
Set the monad GHCi lifts user statements into.
Checks that a type (in string form) is an instance of the
GHC.GHCi.GHCiSandboxIO type class. Sets it to be the GHCi
monad if it is, throws an error otherwise.