GHC.HsToCore.Foreign.Prim

ghc-9.10.0.20240328: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.HsToCore.Foreign.Prim

Description

Foreign primitive calls

This is for ``foreign import prim`' declarations.

Currently, at the core level we pretend that these primitive calls are foreign calls. It may make more sense in future to have them as a distinct kind of Id, or perhaps to bundle them with PrimOps since semantically and for calling convention they are really prim ops.

# Documentation

dsPrimCall :: Id -> Coercion -> ForeignCall -> DsM ([(Id, Expr TyVar)], CHeader, CStub) Source #