License | BSD-style |
---|---|
Maintainer | Haskell Foundation |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- class Storable a where
- class Storable a => StorableFixed a where
- data Ptr a :: * -> *
- plusPtr :: StorableFixed a => Ptr a -> CountOf a -> Ptr a
- castPtr :: Ptr a -> Ptr b
- peekOff :: StorableFixed a => Ptr a -> Offset a -> IO a
- pokeOff :: StorableFixed a => Ptr a -> Offset a -> a -> IO ()
- peekArray :: (Buildable col, StorableFixed (Element col)) => CountOf (Element col) -> Ptr (Element col) -> IO col
- peekArrayEndedBy :: (Buildable col, StorableFixed (Element col), Eq (Element col), Show (Element col)) => Element col -> Ptr (Element col) -> IO col
- pokeArray :: (Sequential col, StorableFixed (Element col)) => Ptr (Element col) -> col -> IO ()
- pokeArrayEndedBy :: (Sequential col, StorableFixed (Element col)) => Element col -> Ptr (Element col) -> col -> IO ()
Documentation
class Storable a where Source #
Storable type of self determined size.
class Storable a => StorableFixed a where Source #
Extending the Storable type class to the types that can be sequenced in a structure.
Ptr
A value of type
represents a pointer to an object, or an
array of objects, which may be marshalled to or from Haskell values
of type Ptr
aa
.
The type a
will often be an instance of class
Storable
which provides the marshalling operations.
However this is not essential, and you can provide your own operations
to access the pointer. For example you might write small foreign
functions to get or set the fields of a C struct
.
Generic1 k (URec k (Ptr ())) | |
Eq (Ptr a) | |
Data a => Data (Ptr a) | Since: 4.8.0.0 |
Ord (Ptr a) | |
Show (Ptr a) | Since: 2.1 |
Storable (Ptr a) | Since: 2.1 |
NormalForm (Ptr a) | |
StorableFixed (Ptr a) Source # | |
Storable (Ptr a) Source # | |
Functor (URec * (Ptr ())) | |
Foldable (URec * (Ptr ())) | |
Traversable (URec * (Ptr ())) | |
Eq (URec k (Ptr ()) p) | |
Ord (URec k (Ptr ()) p) | |
Generic (URec k (Ptr ()) p) | |
data URec k (Ptr ()) | Used for marking occurrences of Since: 4.9.0.0 |
type Rep1 k (URec k (Ptr ())) | |
type Rep (URec k (Ptr ()) p) | |
offset based helper
pokeOff :: StorableFixed a => Ptr a -> Offset a -> a -> IO () Source #
like poke
but at a given offset.
Collection
peekArray :: (Buildable col, StorableFixed (Element col)) => CountOf (Element col) -> Ptr (Element col) -> IO col Source #
peekArrayEndedBy :: (Buildable col, StorableFixed (Element col), Eq (Element col), Show (Element col)) => Element col -> Ptr (Element col) -> IO col Source #
pokeArray :: (Sequential col, StorableFixed (Element col)) => Ptr (Element col) -> col -> IO () Source #
pokeArrayEndedBy :: (Sequential col, StorableFixed (Element col)) => Element col -> Ptr (Element col) -> col -> IO () Source #