Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Hooks
- class HasHooks m where
- class ContainsHooks a where
- extractHooks :: a -> Hooks
- emptyHooks :: Hooks
- type family DsForeignsHook :: Type
- dsForeignsHook :: Hooks -> Maybe DsForeignsHook
- tcForeignImportsHook :: Hooks -> Maybe ([LForeignDecl GhcRn] -> TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt))
- tcForeignExportsHook :: Hooks -> Maybe ([LForeignDecl GhcRn] -> TcM (LHsBinds GhcTc, [LForeignDecl GhcTc], Bag GlobalRdrElt))
- hscFrontendHook :: Hooks -> Maybe (ModSummary -> Hsc FrontendResult)
- hscCompileCoreExprHook :: Hooks -> Maybe (HscEnv -> SrcSpan -> CoreExpr -> IO ForeignHValue)
- ghcPrimIfaceHook :: Hooks -> Maybe ModIface
- runPhaseHook :: Hooks -> Maybe (PhasePlus -> FilePath -> CompPipeline (PhasePlus, FilePath))
- runMetaHook :: Hooks -> Maybe (MetaHook TcM)
- linkHook :: Hooks -> Maybe (GhcLink -> DynFlags -> Bool -> HomePackageTable -> IO SuccessFlag)
- runRnSpliceHook :: Hooks -> Maybe (HsSplice GhcRn -> RnM (HsSplice GhcRn))
- getValueSafelyHook :: Hooks -> Maybe (HscEnv -> Name -> Type -> IO (Maybe HValue))
- createIservProcessHook :: Hooks -> Maybe (CreateProcess -> IO ProcessHandle)
- stgToCmmHook :: Hooks -> Maybe (DynFlags -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -> HpcInfo -> Stream IO CmmGroup (CStub, ModuleLFInfos))
- cmmToRawCmmHook :: Hooks -> forall a. Maybe (DynFlags -> Maybe Module -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a))
Documentation
class ContainsHooks a where Source #
extractHooks :: a -> Hooks Source #
Instances
ContainsHooks (Env gbl lcl) Source # | |
Defined in GHC.Tc.Types extractHooks :: Env gbl lcl -> Hooks Source # |
emptyHooks :: Hooks Source #
Hooks can be used by GHC API clients to replace parts of the compiler pipeline. If a hook is not installed, GHC uses the default built-in behaviour
type family DsForeignsHook :: Type Source #
dsForeignsHook :: Hooks -> Maybe DsForeignsHook Source #
Actual type:
Maybe ([LForeignDecl GhcTc] -> DsM (ForeignStubs, OrdList (Id, CoreExpr)))
tcForeignImportsHook :: Hooks -> Maybe ([LForeignDecl GhcRn] -> TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt)) Source #
tcForeignExportsHook :: Hooks -> Maybe ([LForeignDecl GhcRn] -> TcM (LHsBinds GhcTc, [LForeignDecl GhcTc], Bag GlobalRdrElt)) Source #
hscFrontendHook :: Hooks -> Maybe (ModSummary -> Hsc FrontendResult) Source #
hscCompileCoreExprHook :: Hooks -> Maybe (HscEnv -> SrcSpan -> CoreExpr -> IO ForeignHValue) Source #
runPhaseHook :: Hooks -> Maybe (PhasePlus -> FilePath -> CompPipeline (PhasePlus, FilePath)) Source #
linkHook :: Hooks -> Maybe (GhcLink -> DynFlags -> Bool -> HomePackageTable -> IO SuccessFlag) Source #
createIservProcessHook :: Hooks -> Maybe (CreateProcess -> IO ProcessHandle) Source #
stgToCmmHook :: Hooks -> Maybe (DynFlags -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -> HpcInfo -> Stream IO CmmGroup (CStub, ModuleLFInfos)) Source #
cmmToRawCmmHook :: Hooks -> forall a. Maybe (DynFlags -> Maybe Module -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a)) Source #