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.Ptr

Contents

Description

 
Synopsis

Documentation

data ConstPtr a Source #

Instances
DiffTorsor ConstPtr Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

act :: Diff a b -> ConstPtr a -> ConstPtr b

diff :: ConstPtr b -> ConstPtr a -> Diff a b

Eq (ConstPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

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

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

Data a => Data (ConstPtr 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) -> ConstPtr a -> c (ConstPtr a) #

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

toConstr :: ConstPtr a -> Constr #

dataTypeOf :: ConstPtr a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord (ConstPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

compare :: ConstPtr a -> ConstPtr a -> Ordering #

(<) :: ConstPtr a -> ConstPtr a -> Bool #

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

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

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

max :: ConstPtr a -> ConstPtr a -> ConstPtr a #

min :: ConstPtr a -> ConstPtr a -> ConstPtr a #

Show (ConstPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

showsPrec :: Int -> ConstPtr a -> ShowS #

show :: ConstPtr a -> String #

showList :: [ConstPtr a] -> ShowS #

Storable (ConstPtr a) Source # 
Instance details

Defined in Data.Const.Unsafe

Methods

sizeOf :: ConstPtr a -> Int #

alignment :: ConstPtr a -> Int #

peekElemOff :: Ptr (ConstPtr a) -> Int -> IO (ConstPtr a) #

pokeElemOff :: Ptr (ConstPtr a) -> Int -> ConstPtr a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (ConstPtr a) #

pokeByteOff :: Ptr b -> Int -> ConstPtr a -> IO () #

peek :: Ptr (ConstPtr a) -> IO (ConstPtr a) #

poke :: Ptr (ConstPtr a) -> ConstPtr a -> IO () #

Constable ConstPtr Ptr Source # 
Instance details

Defined in Data.Const.Unsafe

Constable ConstPtr ConstPtr Source # 
Instance details

Defined in Data.Const.Unsafe

constPtr :: APtr p => p a -> ConstPtr a Source #

const-agnostic operations

peekAt :: forall p a. (Storable a, APtr p) => p a -> IO a Source #

peekAtElemOff :: forall p a. (Storable a, APtr p) => p a -> Int -> IO a Source #

peekAtByteOff :: forall p a b. (Storable a, APtr p) => p b -> Int -> IO a Source #

const preserving operations

minusAPtr :: forall p q a b. (APtr p, APtr q) => p a -> q b -> Int Source #

castAPtr :: forall p a b. APtr p => p a -> p b Source #

plusAPtr :: forall p a b. APtr p => p a -> Int -> p b Source #

alignAPtr :: forall p a. APtr p => p a -> Int -> p a Source #

operations returning const pointers

castConstPtr :: forall p a b. APtr p => p a -> ConstPtr b Source #

plusConstPtr :: forall p a b. APtr p => p a -> Int -> ConstPtr b Source #

alignConstPtr :: forall p a. APtr p => p a -> Int -> ConstPtr a Source #