ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Driver.Hooks

Synopsis

Documentation

class HasHooks (m :: Type -> Type) where Source #

Methods

getHooks :: m Hooks Source #

Instances

Instances details
ContainsHooks env => HasHooks (IOEnv env) Source # 
Instance details

Defined in GHC.Data.IOEnv

Methods

getHooks :: IOEnv env Hooks Source #

class ContainsHooks a where Source #

Methods

extractHooks :: a -> Hooks Source #

Instances

Instances details
ContainsHooks (Env gbl lcl) Source # 
Instance details

Defined in GHC.Tc.Types

Methods

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

Instances

Instances details
type DsForeignsHook Source # 
Instance details

Defined in GHC.HsToCore.Types

dsForeignsHook :: Hooks -> Maybe DsForeignsHook Source #

Actual type: Maybe ([LForeignDecl GhcTc] -> DsM (ForeignStubs, OrdList (Id, CoreExpr)))

cmmToRawCmmHook :: Hooks -> forall a. Maybe (DynFlags -> Maybe Module -> Stream IO CmmGroupSRTs a -> IO (Stream IO RawCmmGroup a)) Source #

Deprecated: cmmToRawCmmHook is being deprecated. If you do use it in your project, please raise a GHC issue!