ghc-7.10.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

TcRnMonad

Synopsis

Documentation

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

Setup the initial typechecking environment

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

discardResult :: TcM a -> TcM ()

getGblEnv :: TcRnIf gbl lcl gbl

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

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

getLclEnv :: TcRnIf gbl lcl lcl

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

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

getEnvs :: TcRnIf gbl lcl (gbl, lcl)

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

doptM :: DumpFlag -> TcRnIf gbl lcl Bool

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

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

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

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

Do it flag is true

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

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

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

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

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

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 ()

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)

readTcRef :: TcRef a -> TcRnIf gbl lcl a

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

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

updTcRefX :: TcRef a -> (a -> a) -> TcRnIf gbl lcl a

traceTc :: String -> SDoc -> TcRn ()

traceTcN :: Int -> SDoc -> TcRn ()

Typechecker trace

traceRn :: SDoc -> TcRn ()

traceOptTcRn :: DumpFlag -> SDoc -> TcRn ()

Output a doc if the given DumpFlag is set.

By default this logs to stdout However, if the `-ddump-to-file` flag is set, then this will dump output to a file

Just a wrapper for dumpSDoc

traceTcRn :: DumpFlag -> SDoc -> TcRn ()

Unconditionally dump some trace output

The DumpFlag is used only to set the output filename for --dump-to-file, not to decide whether or not to output That part is done by the caller

printForUserTcRn :: SDoc -> TcRn ()

Like logInfoTcRn, but for user consumption

debugDumpTcRn :: SDoc -> TcRn ()

Typechecker debug

traceIf :: SDoc -> TcRnIf m n ()

traceHiDiffs :: SDoc -> TcRnIf m n ()

traceOptIf :: DumpFlag -> SDoc -> TcRnIf m n ()

setModule :: Module -> TcRn a -> TcRn a

extendFixityEnv :: [(Name, FixItem)] -> RnM a -> RnM a

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

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

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

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

addErr :: MsgDoc -> TcRn ()

addErrs :: [(SrcSpan, MsgDoc)] -> TcRn ()

checkErr :: Bool -> MsgDoc -> TcRn ()

warnIf :: Bool -> MsgDoc -> TcRn ()

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

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

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

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

checkNoErrs :: TcM r -> TcM r

whenNoErrs :: TcM () -> TcM ()

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

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

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

setErrCtxt :: [ErrCtxt] -> TcM a -> TcM a

addErrCtxt :: MsgDoc -> TcM a -> TcM a

addErrCtxtM :: (TidyEnv -> TcM (TidyEnv, MsgDoc)) -> TcM a -> TcM a

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

popErrCtxt :: TcM a -> TcM a

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

addErrsTc :: [MsgDoc] -> TcM ()

checkTc :: Bool -> MsgDoc -> TcM ()

warnTc :: Bool -> MsgDoc -> TcM ()

debugTc :: TcM () -> TcM ()

emitSimple :: Ct -> TcM ()

pushTcLevelM :: TcM a -> TcM a

setTcLevel :: TcLevel -> TcM a -> TcM a

setStage :: ThStage -> TcM a -> TcRn a

recordUnsafeInfer :: TcM ()

Mark that safe inference has failed

finalSafeMode :: DynFlags -> TcGblEnv -> IO SafeHaskellMode

Figure out the final correct safe haskell mode

initIfaceTcRn :: IfG a -> TcRn a

Run an IfG (top-level interface monad) computation inside an existing TcRn (typecheck-renaming monad) computation by initializing an IfGblEnv based on TcGblEnv.

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

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

forkM_maybe :: SDoc -> IfL a -> IfL (Maybe a)

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

module TcRnTypes

module IOEnv