generic-storable-0.1.0.0: Generic implementation of Storable

Safe HaskellSafe-Infered

Foreign.Storable.Generic

Contents

Synopsis

Generic Storable class

class GStorable f whereSource

Generic Storable class

Methods

gsizeOf :: f a -> IntSource

galignment :: f a -> IntSource

gpeek :: Ptr (f a) -> IO (f a)Source

gpeekByteOff :: Ptr (f a) -> Int -> IO (f a)Source

gpeekElemOff :: Ptr (f a) -> Int -> IO (f a)Source

gpoke :: Ptr (f a) -> f a -> IO ()Source

gpokeByteOff :: Ptr (f a) -> Int -> f a -> IO ()Source

gpokeElemOff :: Ptr (f a) -> Int -> f a -> IO ()Source

Instances

GStorable U1 
Storable a => GStorable (K1 i a) 
(GStorable a, GStorable b) => GStorable (:+: a b) 
(GStorable a, GStorable b) => GStorable (:*: a b) 
GStorable a => GStorable (M1 i c a) 

Default functions

pokeDefault :: (Generic a, GStorable (Rep a)) => Ptr a -> a -> IO ()Source

Wrapper

newtype StorableWrapper a Source

Constructors

StorableWrapper 

Fields

unStorableWrapper :: a
 

Instances