GHC.Types.ForeignStubs

ghc-9.2.0.20210331: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Types.ForeignStubs

Description

Foreign export stubs

Synopsis

- data ForeignStubs
  - = NoStubs
  - | ForeignStubs CHeader CStub
- newtype CHeader = CHeader {
  - getCHeader :: SDoc
  }
- newtype CStub = CStub {
  - getCStub :: SDoc
  }
- appendStubC :: ForeignStubs -> CStub -> ForeignStubs

# Documentation

data ForeignStubs Source #

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

Constructors

CHeader |
Fields getCHeader :: SDoc

#### Instances

Instances details

Monoid CHeader # |
Instance details Defined in GHC.Types.ForeignStubs Methods mempty :: CHeader Source # mappend :: CHeader -> CHeader -> CHeader Source # mconcat :: [CHeader] -> CHeader Source #
Semigroup CHeader # |
Instance details Defined in GHC.Types.ForeignStubs Methods (<>) :: CHeader -> CHeader -> CHeader Source # sconcat :: NonEmpty CHeader -> CHeader Source # stimes :: Integral b => b -> CHeader -> CHeader Source #

newtype CStub Source #

Constructors

CStub |
Fields getCStub :: SDoc

#### Instances

Instances details

Monoid CStub # |
Instance details Defined in GHC.Types.ForeignStubs Methods mempty :: CStub Source # mappend :: CStub -> CStub -> CStub Source # mconcat :: [CStub] -> CStub Source #
Semigroup CStub # |
Instance details Defined in GHC.Types.ForeignStubs Methods (<>) :: CStub -> CStub -> CStub Source # sconcat :: NonEmpty CStub -> CStub Source # stimes :: Integral b => b -> CStub -> CStub Source #

appendStubC :: ForeignStubs -> CStub -> ForeignStubs Source #