const-0: Read-only mutable primitives

Copyright(c) 2019 Edward Kmett
LicenseBSD-2-Clause OR Apache-2.0
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell2010

Foreign.Const.ForeignPtr

Contents

Description

 
Synopsis

Documentation

data ConstForeignPtr a Source #

Instances
DiffTorsor ConstForeignPtr Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

act :: Diff a b -> ConstForeignPtr a -> ConstForeignPtr b

diff :: ConstForeignPtr b -> ConstForeignPtr a -> Diff a b

Eq (ConstForeignPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Data a => Data (ConstForeignPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

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

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

toConstr :: ConstForeignPtr a -> Constr #

dataTypeOf :: ConstForeignPtr a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord (ConstForeignPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Show (ConstForeignPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Constable ConstForeignPtr ForeignPtr Source # 
Instance details

Defined in Data.Const.Unsafe

Constable ConstForeignPtr ConstForeignPtr Source # 
Instance details

Defined in Data.Const.Unsafe

type Unforeign ConstForeignPtr Source # 
Instance details

Defined in Foreign.Const.ForeignPtr

const foreign pointer operations

newConstForeignPtr :: forall p a. APtr p => FinalizerPtr a -> p a -> IO (ConstForeignPtr a) Source #

newConstForeignPtr_ :: forall p a. APtr p => p a -> IO (ConstForeignPtr a) Source #

castConstForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> ConstForeignPtr b Source #

plusConstForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> Int -> ConstForeignPtr b Source #

newConstForeignPtrEnv :: forall p env a. APtr p => FinalizerEnvPtr env a -> Ptr env -> p a -> IO (ConstForeignPtr a) Source #

withConstForeignPtr :: forall fp a r. AForeignPtr fp => fp a -> (ConstPtr a -> IO r) -> IO r Source #

const-preserving foreign pointer operations

type family Unforeign (fp :: Type -> Type) :: Type -> Type Source #

plusAForeignPtr :: forall fp a b. AForeignPtr fp => fp a -> Int -> fp b Source #

withAForeignPtr :: forall fp a r. (AForeignPtr fp, APtr (Unforeign fp)) => fp a -> (Unforeign fp a -> IO r) -> IO r Source #

const agnostic foreign pointer operations

addAForeignPtrFinalizer :: forall fp a. AForeignPtr fp => FinalizerPtr a -> fp a -> IO () Source #

addAForeignPtrFinalizerEnv :: forall fp env a. AForeignPtr fp => FinalizerEnvPtr env a -> Ptr env -> fp a -> IO () Source #

finalizeAForeignPtr :: forall fp a. AForeignPtr fp => fp a -> IO () Source #

touchAForeignPtr :: forall fp a. AForeignPtr fp => fp a -> IO () Source #