ghc-lib-parser-9.8.1.20231009: The GHC API, decoupled from GHC versions
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Types.ForeignStubs

Description

Foreign export stubs

Synopsis

Documentation

data ForeignStubs #

Foreign export stubs

Constructors

NoStubs

We don't have any stubs

ForeignStubs CHeader CStub

There are some stubs. Parameters:

1) Header file prototypes for "foreign exported" functions

2) C stubs to use when calling "foreign exported" functions

newtype CHeader #

Constructors

CHeader 

Fields

Instances

Instances details
Monoid CHeader # 
Instance details

Defined in GHC.Types.ForeignStubs

Semigroup CHeader # 
Instance details

Defined in GHC.Types.ForeignStubs

Methods

(<>) :: CHeader -> CHeader -> CHeader

sconcat :: NonEmpty CHeader -> CHeader

stimes :: Integral b => b -> CHeader -> CHeader

data CStub #

Constructors

CStub 

Fields

Instances

Instances details
Monoid CStub # 
Instance details

Defined in GHC.Types.ForeignStubs

Methods

mempty :: CStub #

mappend :: CStub -> CStub -> CStub #

mconcat :: [CStub] -> CStub #

Semigroup CStub # 
Instance details

Defined in GHC.Types.ForeignStubs

Methods

(<>) :: CStub -> CStub -> CStub

sconcat :: NonEmpty CStub -> CStub

stimes :: Integral b => b -> CStub -> CStub

initializerCStub :: Platform -> CLabel -> SDoc -> SDoc -> CStub #

initializerCStub fn_nm decls body is a CStub containing C initializer function (e.g. an entry of the .init_array section) named fn_nm with the given body and the given set of declarations.

finalizerCStub :: Platform -> CLabel -> SDoc -> SDoc -> CStub #

finalizerCStub fn_nm decls body is a CStub containing C finalizer function (e.g. an entry of the .fini_array section) named fn_nm with the given body and the given set of declarations.