Safe Haskell | None |
---|
- data CValue
- class ToCValue a where
- class FromCValue a where
- fromCValue :: CValue -> Either String a
- data Side
- type UnionPath = [Side]
- data PrimitiveValue
- = PChar CChar
- | PSChar CSChar
- | PUChar CUChar
- | PShort CShort
- | PUShort CUShort
- | PInt CInt
- | PUInt CUInt
- | PLong CLong
- | PULong CULong
- | PPtrdiff CPtrdiff
- | PSize CSize
- | PWchar CWchar
- | PSigAtomic CSigAtomic
- | PLLong CLLong
- | PULLong CULLong
- | PIntPtr CIntPtr
- | PUIntPtr CUIntPtr
- | PIntMax CIntMax
- | PUIntMax CUIntMax
- | PClock CClock
- | PTime CTime
- | PUSeconds CUSeconds
- | PSUSeconds CSUSeconds
- | PFloat CFloat
- | PDouble CDouble
Documentation
A generic C value
ToCValue Class
class FromCValue a whereSource
Derive from this to convert from a CValue to Haskell type
fromCValue :: CValue -> Either String aSource
This is used for the conversion from a CValue back to Haskell type. Ideally it should be and index, but unforunately this does not work with the way Generics creates its :+: binary tree. I'm leaving it here for now, but I might find a more elegant way to handle this.
data PrimitiveValue Source
Primitive C values