ghc-6.10.3: The GHC APIContentsIndex
HscMain
Synopsis
newHscEnv :: DynFlags -> IO HscEnv
hscCmmFile :: GhcMonad m => HscEnv -> FilePath -> m ()
hscParseIdentifier :: GhcMonad m => DynFlags -> String -> m (Located RdrName)
hscSimplify :: ModGuts -> Comp ModGuts
evalComp :: Comp a -> CompState -> IO (Messages, a)
hscNormalIface :: ModGuts -> Comp (ModIface, Bool, ModDetails, CgGuts)
hscWriteIface :: (ModIface, Bool, ModDetails, a) -> Comp (ModIface, ModDetails, a)
hscOneShot :: (ModIface, ModDetails, CgGuts) -> Comp (Maybe HscStatus)
data CompState = CompState {
compHscEnv :: HscEnv
compModSummary :: ModSummary
compOldIface :: Maybe ModIface
}
hscStmt :: GhcMonad m => HscEnv -> String -> m (Maybe ([Id], HValue))
hscTcExpr :: GhcMonad m => HscEnv -> String -> m Type
hscKcType :: GhcMonad m => HscEnv -> String -> m Kind
compileExpr :: HscEnv -> SrcSpan -> CoreExpr -> IO HValue
hscCompileOneShot :: Compiler HscStatus
hscCompileBatch :: Compiler (HscStatus, ModIface, ModDetails)
hscCompileNothing :: Compiler (HscStatus, ModIface, ModDetails)
hscCompileInteractive :: Compiler (InteractiveStatus, ModIface, ModDetails)
data HscStatus
= HscNoRecomp
| HscRecomp Bool
data InteractiveStatus
= InteractiveNoRecomp
| InteractiveRecomp Bool CompiledByteCode ModBreaks
parseFile :: GhcMonad m => HscEnv -> ModSummary -> m (Located (HsModule RdrName))
typecheckModule' :: GhcMonad m => HscEnv -> ModSummary -> Located (HsModule RdrName) -> m TcGblEnv
typecheckRenameModule :: GhcMonad m => HscEnv -> ModSummary -> Located (HsModule RdrName) -> m (TcGblEnv, RenamedStuff)
deSugarModule :: GhcMonad m => HscEnv -> ModSummary -> TcGblEnv -> m ModGuts
makeSimpleIface :: HscEnv -> Maybe ModIface -> TcGblEnv -> ModDetails -> IO (ModIface, Bool)
makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails
type Compiler' m result = HscEnv -> ModSummary -> Bool -> Maybe ModIface -> Maybe (Int, Int) -> m result
backendCompilers :: GhcMonad m => TcGblEnv -> (Compiler' m (HscStatus, ModIface, ModDetails), Compiler' m (InteractiveStatus, ModIface, ModDetails), Compiler' m (HscStatus, ModIface, ModDetails))
Documentation
newHscEnv :: DynFlags -> IO HscEnv
hscCmmFile :: GhcMonad m => HscEnv -> FilePath -> m ()
hscParseIdentifier :: GhcMonad m => DynFlags -> String -> m (Located RdrName)
hscSimplify :: ModGuts -> Comp ModGuts
evalComp :: Comp a -> CompState -> IO (Messages, a)
hscNormalIface :: ModGuts -> Comp (ModIface, Bool, ModDetails, CgGuts)
hscWriteIface :: (ModIface, Bool, ModDetails, a) -> Comp (ModIface, ModDetails, a)
hscOneShot :: (ModIface, ModDetails, CgGuts) -> Comp (Maybe HscStatus)
data CompState
Constructors
CompState
compHscEnv :: HscEnv
compModSummary :: ModSummary
compOldIface :: Maybe ModIface
hscStmt
:: GhcMonad m
=> HscEnv
-> String
-> m (Maybe ([Id], HValue))Nothing == empty statement (or comment only), but no parse error
hscTcExpr :: GhcMonad m => HscEnv -> String -> m Type
hscKcType
:: GhcMonad m
=> HscEnv
-> StringThe type
-> m Kind
Find the kind of a type
compileExpr :: HscEnv -> SrcSpan -> CoreExpr -> IO HValue
hscCompileOneShot :: Compiler HscStatus
hscCompileBatch :: Compiler (HscStatus, ModIface, ModDetails)
hscCompileNothing :: Compiler (HscStatus, ModIface, ModDetails)
hscCompileInteractive :: Compiler (InteractiveStatus, ModIface, ModDetails)
data HscStatus
Constructors
HscNoRecomp
HscRecomp Bool
data InteractiveStatus
Constructors
InteractiveNoRecomp
InteractiveRecomp Bool CompiledByteCode ModBreaks
parseFile :: GhcMonad m => HscEnv -> ModSummary -> m (Located (HsModule RdrName))
parse a file, returning the abstract syntax
typecheckModule' :: GhcMonad m => HscEnv -> ModSummary -> Located (HsModule RdrName) -> m TcGblEnv
Rename and typecheck a module
typecheckRenameModule :: GhcMonad m => HscEnv -> ModSummary -> Located (HsModule RdrName) -> m (TcGblEnv, RenamedStuff)
Rename and typecheck a module, additionally returning the renamed syntax
deSugarModule :: GhcMonad m => HscEnv -> ModSummary -> TcGblEnv -> m ModGuts
Convert a typechecked module to Core
makeSimpleIface :: HscEnv -> Maybe ModIface -> TcGblEnv -> ModDetails -> IO (ModIface, Bool)
Make a ModIface from the results of typechecking. Used when not optimising, and the interface doesn't need to contain any unfoldings or other cross-module optimisation info. ToDo: the old interface is only needed to get the version numbers, we should use fingerprint versions instead.
makeSimpleDetails :: HscEnv -> TcGblEnv -> IO ModDetails
Make a ModDetails from the results of typechecking. Used when typechecking only, as opposed to full compilation.
type Compiler' m result = HscEnv -> ModSummary -> Bool -> Maybe ModIface -> Maybe (Int, Int) -> m result
backendCompilers :: GhcMonad m => TcGblEnv -> (Compiler' m (HscStatus, ModIface, ModDetails), Compiler' m (InteractiveStatus, ModIface, ModDetails), Compiler' m (HscStatus, ModIface, ModDetails))
Produced by Haddock version 2.4.2