ghc-7.8.0.20140228: The GHC API

Safe HaskellNone
LanguageHaskell98

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 a Source

getGblEnv :: TcRnIf gbl lcl gbl Source

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

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

getLclEnv :: TcRnIf gbl lcl lcl Source

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

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

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

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

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

unsetGOptM :: GeneralFlag -> TcRnIf gbl lcl a -> TcRnIf gbl lcl a Source

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

whenDOptM :: DumpFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () Source

Do it flag is true

whenGOptM :: GeneralFlag -> TcRnIf gbl lcl () -> TcRnIf gbl lcl () Source

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

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

withDoDynamicToo :: TcRnIf gbl lcl a -> TcRnIf gbl lcl a Source

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

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 a Source

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

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

traceIf :: SDoc -> TcRnIf m n () Source

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

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

wrapOriginLocM :: (a -> TcM r) -> (Origin, Located a) -> TcM (Origin, Located r) 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 r Source

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

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

Succeeds if applying the argument to all members of the lists succeeds, but nevertheless runs it on all arguments, to collect all errors.

tryTcLIE_ :: TcM r -> TcM r -> TcM r Source

ifErrsM :: TcRn r -> TcRn r -> TcRn r Source

checkTH :: Outputable a => a -> String -> TcRn () Source

failTH :: Outputable a => a -> String -> TcRn x Source

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

setCtLoc :: CtLoc -> TcM a -> TcM a Source

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

recordUnsafeInfer :: TcM () Source

Mark that safe inference has failed

finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode Source

Figure out the final correct safe haskell mode

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

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

forkM :: SDoc -> IfL a -> IfL a Source

module TcRnTypes

module IOEnv