| Safe Haskell | None |
|---|
LLVM.Extra.Marshal
Description
Transfer values between Haskell and JIT generated code
in an LLVM-compatible format.
E.g. Bool is stored as i1 and Haskell tuples are stored as LLVM structs.
Documentation
load :: (C a, Struct a ~ struct, Marshal struct) => Proxy a -> Value (Ptr struct) -> CodeGenFunction r (ValueTuple a)Source
store :: (C a, Struct a ~ struct, Marshal struct) => Proxy a -> ValueTuple a -> Value (Ptr struct) -> CodeGenFunction r ()Source
class (MakeValueTuple a, Marshal (Struct a), IsSized (Struct a)) => C a whereSource
Methods
compose :: Proxy a -> ValueTuple a -> CodeGenFunction r (Value (Struct a))Source
decompose :: Proxy a -> Value (Struct a) -> CodeGenFunction r (ValueTuple a)Source
Instances
| C Bool | |
| C Double | |
| C Float | |
| C Int8 | |
| C Int16 | |
| C Int32 | |
| C Int64 | |
| C Word8 | |
| C Word16 | |
| C Word32 | |
| C Word64 | |
| C () | |
| IsType a => C (Ptr a) | |
| (IsSized (Struct a), IsSized (Struct b), C a, C b) => C (a, b) | |
| (Positive n, Natural (:*: n (SizeOf a)), Marshal a, IsConst a, IsPrimitive a, IsSized a) => C (Vector n a) | |
| (IsSized (Struct a), IsSized (Struct b), IsSized (Struct c), C a, C b, C c) => C (a, b, c) |