Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Foreign.CStorable
Description
This primarily exports the CStorable typeclass, which may have its
methods automatically defaulted if it has a Generic instance.
Then, this instance can be transfered via the Storable
constructor.
- class CStorable a where
- newtype StorableWrap a = Storable a
Documentation
class CStorable a where Source #
This typeclass is basically just a duplicate of Storable
. It exists
because I can't easily modify Storable
, as it is part of base.
Methods
cPeek :: Ptr a -> IO a Source #
cPeek :: (Generic a, GCStorable (Rep a)) => Ptr a -> IO a Source #
cPoke :: Ptr a -> a -> IO () Source #
cPoke :: (Generic a, GCStorable (Rep a)) => Ptr a -> a -> IO () Source #
cAlignment :: a -> Int Source #
cAlignment :: (Generic a, GCStorable (Rep a)) => a -> Int Source #
cSizeOf :: (Generic a, GCStorable (Rep a)) => a -> Int Source #
Instances
Storable a => CStorable (StorableWrap a) Source # | Translates a Storable instance to a CStorable instance |
newtype StorableWrap a Source #
Applying the Storable
constructor to something which is Storable
gives it a corresponding CStorable instance.
Constructors
Storable a |
Instances
Storable a => CStorable (StorableWrap a) Source # | Translates a Storable instance to a CStorable instance |