HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Modulebase-4.23.0.0Haskell2010

Foreign.C.ConstPtr

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

  • 1 type
  • Packagebase-4.23.0.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceConstPtr.hs
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-10.0.0 · GHC.Internal.Foreign.C.ConstPtr
  • Data a => Data (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Data.Data
  • Ord (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.ConstPtr
  • Show (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.C.ConstPtr
  • Storable (ConstPtr a)Defined in ghc-internal-10.0.0 · GHC.Internal.Foreign.Storable