ats-storable-0.3.0.5: Marshal ATS types into Haskell

Safe HaskellNone
LanguageHaskell2010

Foreign.Storable.ATS

Contents

Description

You'll probably want to use this module to simply derive an ATSStorable instance. To do so:

{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveAnyClass     #-}

data MyType a = MyType a
    deriving (Generic, Data, ATSStorable)

Documentation

class ATSStorable a where Source #

Methods

readPtr :: Storable a => Ptr a -> IO a Source #

Read a value at a pointer.

writePtr :: Storable a => a -> IO (Ptr a) Source #

Write a value to a pointer.

Orphan instances

Data CChar Source # 

Methods

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

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

toConstr :: CChar -> Constr #

dataTypeOf :: CChar -> DataType #

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

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

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

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

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

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

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

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

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

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

Data CInt Source # 

Methods

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

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

toConstr :: CInt -> Constr #

dataTypeOf :: CInt -> DataType #

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

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

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

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

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

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

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

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

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

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

(Generic a, Storable' (Rep a), Data a, Recurse a) => Storable a Source # 

Methods

sizeOf :: a -> Int #

alignment :: a -> Int #

peekElemOff :: Ptr a -> Int -> IO a #

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

peekByteOff :: Ptr b -> Int -> IO a #

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

peek :: Ptr a -> IO a #

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