ghc-internal-9.1001.0: Basic libraries
Copyright(c) GHC Developers
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerffi@haskell.org
Stabilityprovisional
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.Foreign.C.ConstPtr

Description

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

Synopsis

Documentation

newtype ConstPtr a Source #

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.

@since base-4.18.0.0

Constructors

ConstPtr 

Fields

Instances

Instances details
Data a => Data (ConstPtr a) Source #

@since base-4.18.0.0

Instance details

Defined in GHC.Internal.Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConstPtr a -> c (ConstPtr a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConstPtr a) Source #

toConstr :: ConstPtr a -> Constr Source #

dataTypeOf :: ConstPtr a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ConstPtr a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ConstPtr a)) Source #

gmapT :: (forall b. Data b => b -> b) -> ConstPtr a -> ConstPtr a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConstPtr a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConstPtr a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ConstPtr a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ConstPtr a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConstPtr a -> m (ConstPtr a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConstPtr a -> m (ConstPtr a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConstPtr a -> m (ConstPtr a) Source #

Storable (ConstPtr a) Source # 
Instance details

Defined in GHC.Internal.Foreign.Storable

Show (ConstPtr a) Source # 
Instance details

Defined in GHC.Internal.Foreign.C.ConstPtr

Eq (ConstPtr a) Source # 
Instance details

Defined in GHC.Internal.Foreign.C.ConstPtr

Methods

(==) :: ConstPtr a -> ConstPtr a -> Bool Source #

(/=) :: ConstPtr a -> ConstPtr a -> Bool Source #

Ord (ConstPtr a) Source # 
Instance details

Defined in GHC.Internal.Foreign.C.ConstPtr