ghc-7.4.2: The GHC API

Safe Haskell | None

ForeignCall

Synopsis

- newtype ForeignCall = CCall CCallSpec
- isSafeForeignCall :: ForeignCall -> Bool
- data Safety
  - = PlaySafe
  - | PlayInterruptible
  - | PlayRisky
- playSafe :: Safety -> Bool
- playInterruptible :: Safety -> Bool
- data CExportSpec = CExportStatic CLabelString CCallConv
- type CLabelString = FastString
- isCLabelString :: CLabelString -> Bool
- pprCLabelString :: CLabelString -> SDoc
- data CCallSpec = CCallSpec CCallTarget CCallConv Safety
- data CCallTarget
  - = StaticTarget CLabelString (Maybe PackageId)
  - | DynamicTarget
- isDynamicTarget :: CCallTarget -> Bool
- data CCallConv
  - = CCallConv
  - | CApiConv
  - | StdCallConv
  - | CmmCallConv
  - | PrimCallConv
- defaultCCallConv :: CCallConv
- ccallConvToInt :: CCallConv -> Int
- ccallConvAttribute :: CCallConv -> SDoc

# Documentation

newtype ForeignCall

Constructors

CCall CCallSpec |

Instances

Eq ForeignCall |
Outputable ForeignCall |
Binary ForeignCall |

isSafeForeignCall :: ForeignCall -> Bool

data Safety

Constructors

PlaySafe |
PlayInterruptible |
PlayRisky |

Instances

Eq Safety |
Data Safety |
Show Safety |
Typeable Safety |
Outputable Safety |
Binary Safety |

playSafe :: Safety -> Bool

playInterruptible :: Safety -> Bool

data CExportSpec

Constructors

CExportStatic CLabelString CCallConv |

Instances

Data CExportSpec |
Typeable CExportSpec |
Outputable CExportSpec |
Binary CExportSpec |

type CLabelString = FastString

isCLabelString :: CLabelString -> Bool

pprCLabelString :: CLabelString -> SDoc

data CCallSpec

Constructors

CCallSpec CCallTarget CCallConv Safety |

Instances

Eq CCallSpec |
Outputable CCallSpec |
Binary CCallSpec |

data CCallTarget

How to call a particular function in C-land.

Constructors

StaticTarget CLabelString (Maybe PackageId) |
DynamicTarget |

Instances

Eq CCallTarget |
Data CCallTarget |
Typeable CCallTarget |
Binary CCallTarget |

isDynamicTarget :: CCallTarget -> Bool

data CCallConv

Constructors

CCallConv |
CApiConv |
StdCallConv |
CmmCallConv |
PrimCallConv |

Instances

Eq CCallConv |
Data CCallConv |
Typeable CCallConv |
Outputable CCallConv |
Binary CCallConv |

defaultCCallConv :: CCallConv

ccallConvToInt :: CCallConv -> Int

ccallConvAttribute :: CCallConv -> SDoc