ghc-7.4.2: The GHC API

Safe HaskellNone

TcRnMonad

Synopsis

Documentation

initTc :: HscEnv -> HscSource -> Bool -> Module -> TcM r -> IO (Messages, Maybe r)Source

Setup the initial typechecking environment

initTcRnIf :: Char -> HscEnv -> gbl -> lcl -> TcRnIf gbl lcl a -> IO aSource

getGblEnv :: TcRnIf gbl lcl gblSource

updGblEnv :: (gbl -> gbl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl aSource

setGblEnv :: gbl -> TcRnIf gbl lcl a -> TcRnIf gbl lcl aSource

getLclEnv :: TcRnIf gbl lcl lclSource

updLclEnv :: (lcl -> lcl) -> TcRnIf gbl lcl a -> TcRnIf gbl lcl aSource

setLclEnv :: lcl' -> TcRnIf gbl lcl' a -> TcRnIf gbl lcl aSource

getEnvs :: TcRnIf gbl lcl (gbl, lcl)Source

setEnvs :: (gbl', lcl') -> TcRnIf gbl' lcl' a -> TcRnIf gbl lcl aSource

setXOptM :: ExtensionFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl aSource

unsetDOptM :: DynFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl aSource

unsetWOptM :: WarningFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl aSource

ifDOptM :: DynFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()Source

Do it flag is true

ifWOptM :: WarningFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()Source

ifXOptM :: ExtensionFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl ()Source

updateEps :: (ExternalPackageState -> (ExternalPackageState, a)) -> TcRnIf gbl lcl aSource

Update the external package state. Returns the second result of the modifier function.

This is an atomic operation and forces evaluation of the modified EPS in order to avoid space leaks.

updateEps_ :: (ExternalPackageState -> ExternalPackageState) -> TcRnIf gbl lcl ()Source

Update the external package state.

This is an atomic operation and forces evaluation of the modified EPS in order to avoid space leaks.

newTcRef :: a -> TcRnIf gbl lcl (TcRef a)Source

readTcRef :: TcRef a -> TcRnIf gbl lcl aSource

writeTcRef :: TcRef a -> a -> TcRnIf gbl lcl ()Source

updTcRef :: TcRef a -> (a -> a) -> TcRnIf gbl lcl ()Source

addLocM :: (a -> TcM b) -> Located a -> TcM bSource

wrapLocM :: (a -> TcM b) -> Located a -> TcM (Located b)Source

wrapLocFstM :: (a -> TcM (b, c)) -> Located a -> TcM (Located b, c)Source

wrapLocSndM :: (a -> TcM (b, c)) -> Located a -> TcM (b, Located c)Source

recoverM :: TcRn r -> TcRn r -> TcRn rSource

mapAndRecoverM :: (a -> TcRn b) -> [a] -> TcRn [b]Source

tryTcLIE_ :: TcM r -> TcM r -> TcM rSource

ifErrsM :: TcRn r -> TcRn r -> TcRn rSource

updCtxt :: ([ErrCtxt] -> [ErrCtxt]) -> TcM a -> TcM aSource

getCtLoc :: orig -> TcM (CtLoc orig)Source

setCtLoc :: CtLoc orig -> TcM a -> TcM aSource

debugTc :: TcM () -> TcM ()Source

recordUnsafeInfer :: TcM ()Source

Mark that safe inference has failed

finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellModeSource

Figure out the final correct safe haskell mode

initIfaceTc :: ModIface -> (TcRef TypeEnv -> IfL a) -> TcRnIf gbl lcl aSource

initIfaceLcl :: Module -> SDoc -> IfL a -> IfM lcl aSource

forkM :: SDoc -> IfL a -> IfL aSource

module TcRnTypes

module IOEnv