HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.Types.ForeignCall

  • 9 types
  • 8 values
  • Packageghc-9.14.1
  • Exports17
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceForeignCall.hs
datadata Safety
#

Constructors

  • PlaySafe

    Might invoke Haskell GC, or do a call back, or switch threads, etc. So make sure things are tidy before the call. Additionally, in the threaded RTS we arrange for the external call to be executed by a separate OS thread, i.e., _concurrently_ to the execution of other Haskell threads.

  • PlayInterruptible

    Like PlaySafe, but additionally the worker thread running this foreign call may be unceremoniously killed, so it must be scheduled on an unbound thread.

  • PlayRisky

    None of the above can happen; the call will return without interacting with the runtime system at all. Specifically:

    • No GC

    • No call backs

    • No blocking

    • No precise exceptions

Instances8Enum, Eq, Data, Show, NFData, Outputable, …
datadata CCallConv
#
Instances8Enum, Eq, Data, Show, NFData, Outputable, …
datadata CType
#

A C type, used in CAPI FFI calls

Instances6Eq, Data, NFData, Outputable, Binary, Anno