Safe Haskell | None |
---|
- class (Phi llvmValue, Undefined llvmValue, IsType (Struct llvmValue), IsSized (Struct llvmValue)) => C llvmValue where
- type Struct llvmValue :: *
- load :: Value (Ptr (Struct llvmValue)) -> CodeGenFunction r llvmValue
- store :: llvmValue -> Value (Ptr (Struct llvmValue)) -> CodeGenFunction r ()
- decompose :: Value (Struct llvmValue) -> CodeGenFunction r llvmValue
- compose :: llvmValue -> CodeGenFunction r (Value (Struct llvmValue))
- modify :: C llvmValue => (llvmValue -> CodeGenFunction r llvmValue) -> Value (Ptr (Struct llvmValue)) -> CodeGenFunction r ()
- castStorablePtr :: (MakeValueTuple haskellValue, C (ValueTuple haskellValue)) => Ptr haskellValue -> Ptr (Struct (ValueTuple haskellValue))
- castTuplePtr :: (MakeValueTuple haskellValue, C (ValueTuple haskellValue)) => Ptr haskellValue -> Ptr (Struct (ValueTuple haskellValue))
- type Record r o v = Element r o v v
- data Element r o v x
- element :: (C x, GetValue o n, ValueType o n ~ Struct x, GetElementPtr o (n, ()), ElementPtrType o (n, ()) ~ Struct x) => (v -> x) -> n -> Element r o v x
- loadRecord :: Record r o llvmValue -> Value (Ptr o) -> CodeGenFunction r llvmValue
- storeRecord :: Record r o llvmValue -> llvmValue -> Value (Ptr o) -> CodeGenFunction r ()
- decomposeRecord :: Record r o llvmValue -> Value o -> CodeGenFunction r llvmValue
- composeRecord :: IsType o => Record r o llvmValue -> llvmValue -> CodeGenFunction r (Value o)
- loadNewtype :: C a => (a -> llvmValue) -> Value (Ptr (Struct a)) -> CodeGenFunction r llvmValue
- storeNewtype :: C a => (llvmValue -> a) -> llvmValue -> Value (Ptr (Struct a)) -> CodeGenFunction r ()
- decomposeNewtype :: C a => (a -> llvmValue) -> Value (Struct a) -> CodeGenFunction r llvmValue
- composeNewtype :: C a => (llvmValue -> a) -> llvmValue -> CodeGenFunction r (Value (Struct a))
- class (IsFirstClass llvmType, IsType (Stored llvmType)) => FirstClass llvmType where
- type Stored llvmType :: *
Documentation
class (Phi llvmValue, Undefined llvmValue, IsType (Struct llvmValue), IsSized (Struct llvmValue)) => C llvmValue whereSource
An implementation of both MakeValueTuple
and C
must ensure that haskellValue
is compatible
with Stored (Struct haskellValue)
(which we want to call llvmStruct
).
That is, writing and reading llvmStruct
by LLVM
must be the same as accessing haskellValue
by Storable
methods.
ToDo: In future we may also require Storable constraint for llvmStruct
.
We use a functional dependency in order to let type inference work nicely.
load :: Value (Ptr (Struct llvmValue)) -> CodeGenFunction r llvmValueSource
store :: llvmValue -> Value (Ptr (Struct llvmValue)) -> CodeGenFunction r ()Source
decompose :: Value (Struct llvmValue) -> CodeGenFunction r llvmValueSource
compose :: llvmValue -> CodeGenFunction r (Value (Struct llvmValue))Source
modify :: C llvmValue => (llvmValue -> CodeGenFunction r llvmValue) -> Value (Ptr (Struct llvmValue)) -> CodeGenFunction r ()Source
castStorablePtr :: (MakeValueTuple haskellValue, C (ValueTuple haskellValue)) => Ptr haskellValue -> Ptr (Struct (ValueTuple haskellValue))Source
Deprecated: use castTuplePtr instead
castTuplePtr :: (MakeValueTuple haskellValue, C (ValueTuple haskellValue)) => Ptr haskellValue -> Ptr (Struct (ValueTuple haskellValue))Source
element :: (C x, GetValue o n, ValueType o n ~ Struct x, GetElementPtr o (n, ()), ElementPtrType o (n, ()) ~ Struct x) => (v -> x) -> n -> Element r o v xSource
loadRecord :: Record r o llvmValue -> Value (Ptr o) -> CodeGenFunction r llvmValueSource
storeRecord :: Record r o llvmValue -> llvmValue -> Value (Ptr o) -> CodeGenFunction r ()Source
decomposeRecord :: Record r o llvmValue -> Value o -> CodeGenFunction r llvmValueSource
composeRecord :: IsType o => Record r o llvmValue -> llvmValue -> CodeGenFunction r (Value o)Source
loadNewtype :: C a => (a -> llvmValue) -> Value (Ptr (Struct a)) -> CodeGenFunction r llvmValueSource
storeNewtype :: C a => (llvmValue -> a) -> llvmValue -> Value (Ptr (Struct a)) -> CodeGenFunction r ()Source
decomposeNewtype :: C a => (a -> llvmValue) -> Value (Struct a) -> CodeGenFunction r llvmValueSource
composeNewtype :: C a => (llvmValue -> a) -> llvmValue -> CodeGenFunction r (Value (Struct a))Source
class (IsFirstClass llvmType, IsType (Stored llvmType)) => FirstClass llvmType Source
FirstClass Bool | |
FirstClass Double | |
FirstClass Float | |
FirstClass Int8 | |
FirstClass Int16 | |
FirstClass Int32 | |
FirstClass Int64 | |
FirstClass Word8 | |
FirstClass Word16 | |
FirstClass Word32 | |
FirstClass Word64 | |
FirstClass (StablePtr a) | |
IsType a => FirstClass (Ptr a) | |
IsFunction a => FirstClass (FunPtr a) | |
(IsFirstClass (Struct s), IsType (Struct (StoredStruct s)), ConvertStruct s D0 s) => FirstClass (Struct s) | |
(Natural n, IsFirstClass (Stored a), FirstClass a, IsSized a, IsSized (Stored a)) => FirstClass (Array n a) | |
(Positive n, IsPrimitive a, IsPrimitive (Stored a), FirstClass a) => FirstClass (Vector n a) |