HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.Types.ForeignCall

  • 9 types
  • 9 values
  • Packageghc-9.10.3
  • Exports18
  • 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

Instances7Enum, Eq, Data, Show, Outputable, Binary, …
datadata CCallConv
#
Instances6Enum, Eq, Data, Outputable, Binary, Anno
datadata CType
#

A C type, used in CAPI FFI calls

Instances5Eq, Data, Outputable, Binary, Anno