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-internal-9.1003.0Haskell2010

GHC.Internal.Foreign.C.ConstPtr

This module provides typed const pointers to foreign data. It is part of the Foreign Function Interface (FFI).

  • 1 type
newtypenewtype ConstPtr a
#

A pointer with the C const qualifier. For instance, an argument of type ConstPtr CInt would be marshalled as const int*.

While const-ness generally does not matter for ccall imports (since const and non-const pointers typically have equivalent calling conventions), it does matter for capi imports. See GHC #22043.

Constructors

Instances5Eq, Data, Ord, Show, Storable
  • Eq (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.ConstPtr
  • Data a => Data (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.ConstPtr
  • Show (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.C.ConstPtr
  • Storable (ConstPtr a)Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable