storable-peek-poke-0.1.0.2: class Sizable, Peek and Poke
Safe HaskellSafe-Inferred
LanguageHaskell2010

Foreign.Storable.PeekPoke.Internal

Synopsis

Sizable, Peek and Poke

class Sizable a where Source #

Instances

Instances details
Storable a => Sizable a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

class Peek a where Source #

Methods

peek' :: Ptr a -> IO a Source #

Instances

Instances details
Storable a => Peek a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

peek' :: Ptr a -> IO a Source #

peekMaybe :: Peek a => Ptr a -> IO (Maybe a) Source #

class Poke a where Source #

Methods

poke' :: Ptr a -> a -> IO () Source #

Instances

Instances details
Storable a => Poke a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

poke' :: Ptr a -> a -> IO () Source #

Peekable, WithPoked and Pokable

class (Sizable a, Peek a) => Peekable a Source #

Instances

Instances details
(Sizable a, Peek a) => Peekable a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

peekArray' :: forall a. Peekable a => Int -> Ptr a -> IO [a] Source #

class WithPoked a where Source #

Methods

withPoked' :: a -> (forall s. PtrS s a -> IO b) -> IO b Source #

Instances

Instances details
Pokable a => WithPoked a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

withPoked' :: a -> (forall s. PtrS s a -> IO b) -> IO b Source #

WithPoked a => WithPoked (Id a) Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

withPoked' :: Id a -> (forall s. PtrS s (Id a) -> IO b) -> IO b Source #

WithPoked (t a) => WithPoked (M t ('Just a)) Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

withPoked' :: M t ('Just a) -> (forall s. PtrS s (M t ('Just a)) -> IO b) -> IO b Source #

WithPoked (M t ('Nothing :: Maybe Type)) Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

withPoked' :: M t 'Nothing -> (forall s. PtrS s (M t 'Nothing) -> IO b) -> IO b Source #

newtype PtrS s a Source #

Constructors

PtrS_ (Ptr a) 

Instances

Instances details
Show (PtrS s a) Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

Methods

showsPrec :: Int -> PtrS s a -> ShowS #

show :: PtrS s a -> String #

showList :: [PtrS s a] -> ShowS #

ptrS :: Ptr a -> PtrS s a Source #

withPtrS :: PtrS s a -> (Ptr a -> IO b) -> IO () Source #

withPokedMaybe' :: WithPoked a => Maybe a -> (forall s. PtrS s a -> IO b) -> IO b Source #

class (Sizable a, Poke a, WithPoked a) => Pokable a Source #

Instances

Instances details
(Sizable a, Poke a) => Pokable a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

withPoked :: Pokable a => a -> (Ptr a -> IO b) -> IO b Source #

withPokedMaybe :: Pokable a => Maybe a -> (Ptr a -> IO b) -> IO b Source #

Storable' and NullPtr

class (Peekable a, Pokable a, Storable a) => Storable' a Source #

Instances

Instances details
(Peekable a, Pokable a, Storable a) => Storable' a Source # 
Instance details

Defined in Foreign.Storable.PeekPoke.Internal

pattern NullPtr :: Ptr a Source #