ghc-9.12.0.20241114: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Unit.Module.WholeCoreBindings

Synopsis

Documentation

data WholeCoreBindings Source #

Constructors

WholeCoreBindings 

Fields

newtype IfaceCLabel Source #

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

Constructors

IfaceCLabel CStubLabel 

data IfaceCStubs Source #

Simplified encoding of ForeignStubs for interface serialization.

See Note [Foreign stubs and TH bytecode linking]

data IfaceForeignFile Source #

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.

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

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

Decode serialized foreign stubs and foreign files.

See Note [Foreign stubs and TH bytecode linking]