ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions
Safe HaskellIgnore
LanguageGHC2021

GHC.Unit.Module.WholeCoreBindings

Synopsis

Documentation

data WholeCoreBindings #

Constructors

WholeCoreBindings 

Fields

newtype IfaceCLabel #

Wrapper for avoiding a dependency on Binary and NFData in CLabel.

Constructors

IfaceCLabel CStubLabel 

Instances

Instances details
NFData IfaceCLabel # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Methods

rnf :: IfaceCLabel -> () #

Binary IfaceCLabel # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Outputable IfaceCLabel # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Methods

ppr :: IfaceCLabel -> SDoc #

data IfaceCStubs #

Simplified encoding of ForeignStubs for interface serialization.

See Note [Foreign stubs and TH bytecode linking]

Instances

Instances details
NFData IfaceCStubs # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Methods

rnf :: IfaceCStubs -> () #

Binary IfaceCStubs # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Outputable IfaceCStubs # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Methods

ppr :: IfaceCStubs -> SDoc #

data IfaceForeignFile #

A source file added from Template Haskell using qAddForeignFilePath, for storage in interfaces.

See Note [Foreign stubs and TH bytecode linking]

Constructors

IfaceForeignFile 

Fields

  • lang :: ForeignSrcLang

    The language is specified by the user.

  • source :: String

    The contents of the file, which will be written to a temporary file when loaded from an interface.

  • extension :: FilePath

    The extension used by the user is preserved, to avoid confusing external tools with an unexpected .c file or similar.

data IfaceForeign #

Instances

Instances details
NFData IfaceForeign # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Methods

rnf :: IfaceForeign -> () #

Binary IfaceForeign # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Outputable IfaceForeign # 
Instance details

Defined in GHC.Unit.Module.WholeCoreBindings

Methods

ppr :: IfaceForeign -> SDoc #

encodeIfaceForeign :: Logger -> DynFlags -> ForeignStubs -> [(ForeignSrcLang, FilePath)] -> IO IfaceForeign #

Convert foreign stubs and foreign files to a format suitable for writing to interfaces.

See Note [Foreign stubs and TH bytecode linking]

decodeIfaceForeign :: Logger -> TmpFs -> TempDir -> IfaceForeign -> IO (ForeignStubs, [(ForeignSrcLang, FilePath)]) #

Decode serialized foreign stubs and foreign files.

See Note [Foreign stubs and TH bytecode linking]