TcRnDriver

ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

TcRnDriver

Synopsis

- tcRnStmt :: HscEnv -> GhciLStmt RdrName -> IO (Messages, Maybe ([Id], LHsExpr Id, FixityEnv))
- tcRnExpr :: HscEnv -> LHsExpr RdrName -> IO (Messages, Maybe Type)
- tcRnType :: HscEnv -> Bool -> LHsType RdrName -> IO (Messages, Maybe (Type, Kind))
- tcRnImportDecls :: HscEnv -> [LImportDecl RdrName] -> IO (Messages, Maybe GlobalRdrEnv)
- tcRnLookupRdrName :: HscEnv -> RdrName -> IO (Messages, Maybe [Name])
- getModuleInterface :: HscEnv -> Module -> IO (Messages, Maybe ModIface)
- tcRnDeclsi :: HscEnv -> [LHsDecl RdrName] -> IO (Messages, Maybe TcGblEnv)
- isGHCiMonad :: HscEnv -> String -> IO (Messages, Maybe Name)
- runTcInteractive :: HscEnv -> TcRn a -> IO (Messages, Maybe a)
- tcRnLookupName :: HscEnv -> Name -> IO (Messages, Maybe TyThing)
- tcRnGetInfo :: HscEnv -> Name -> IO (Messages, Maybe (TyThing, Fixity, [ClsInst], [FamInst]))
- tcRnModule :: HscEnv -> HscSource -> Bool -> HsParsedModule -> IO (Messages, Maybe TcGblEnv)
- tcRnModuleTcRnM :: HscEnv -> HscSource -> HsParsedModule -> (Module, SrcSpan) -> TcRn TcGblEnv
- tcTopSrcDecls :: ModDetails -> HsGroup Name -> TcM (TcGblEnv, TcLclEnv)
- tcRnExtCore :: HscEnv -> HsExtCore RdrName -> IO (Messages, Maybe ModGuts)

# Documentation

tcRnStmt :: HscEnv -> GhciLStmt RdrName -> IO (Messages, Maybe ([Id], LHsExpr Id, FixityEnv)) Source

The returned [Id] is the list of new Ids bound by this statement. It can be used to extend the InteractiveContext via extendInteractiveContext.

The returned TypecheckedHsExpr is of type IO [ () ], a list of the bound values, coerced to ().

tcRnExpr :: HscEnv -> LHsExpr RdrName -> IO (Messages, Maybe Type) Source

tcRnType :: HscEnv -> Bool -> LHsType RdrName -> IO (Messages, Maybe (Type, Kind)) Source

tcRnImportDecls :: HscEnv -> [LImportDecl RdrName] -> IO (Messages, Maybe GlobalRdrEnv) Source

tcRnLookupRdrName :: HscEnv -> RdrName -> IO (Messages, Maybe [Name]) Source

getModuleInterface :: HscEnv -> Module -> IO (Messages, Maybe ModIface) Source

ASSUMES that the module is either in the `HomePackageTable` or is a package module with an interface on disk. If neither of these is true, then the result will be an error indicating the interface could not be found.

tcRnDeclsi :: HscEnv -> [LHsDecl RdrName] -> IO (Messages, Maybe TcGblEnv) Source

isGHCiMonad :: HscEnv -> String -> IO (Messages, Maybe Name) Source

runTcInteractive :: HscEnv -> TcRn a -> IO (Messages, Maybe a) Source

tcRnLookupName :: HscEnv -> Name -> IO (Messages, Maybe TyThing) Source

tcRnGetInfo :: HscEnv -> Name -> IO (Messages, Maybe (TyThing, Fixity, [ClsInst], [FamInst])) Source

tcRnModule :: HscEnv -> HscSource -> Bool -> HsParsedModule -> IO (Messages, Maybe TcGblEnv) Source

Top level entry point for typechecker and renamer

tcRnModuleTcRnM :: HscEnv -> HscSource -> HsParsedModule -> (Module, SrcSpan) -> TcRn TcGblEnv Source

tcTopSrcDecls :: ModDetails -> HsGroup Name -> TcM (TcGblEnv, TcLclEnv) Source

tcRnExtCore :: HscEnv -> HsExtCore RdrName -> IO (Messages, Maybe ModGuts) Source