Safe Haskell | None |
---|
- type TValue r a = CodeGenFunction r (Value a)
- (%==) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
- (%/=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
- (%<) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
- (%<=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
- (%>) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
- (%>=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)
- (%&&) :: TValue r Bool -> TValue r Bool -> TValue r Bool
- (%||) :: TValue r Bool -> TValue r Bool -> TValue r Bool
- (?) :: IsFirstClass a => TValue r Bool -> (TValue r a, TValue r a) -> TValue r a
- (??) :: (IsFirstClass a, CmpRet a) => TValue r (CmpResult a) -> (TValue r a, TValue r a) -> TValue r a
- retrn :: Ret (Value a) r => TValue r a -> CodeGenFunction r ()
- set :: TValue r a -> CodeGenFunction r (TValue r a)
- class ArithFunction r z a b | a -> b r z, b r z -> a
- arithFunction :: ArithFunction r z a b => a -> b
- class ToArithFunction r a b | a r -> b, b -> a r
- toArithFunction :: ToArithFunction r f g => Function f -> g
- recursiveFunction :: (IsFunction f, FunctionArgs f, code ~ FunctionCodeGen f, ArithFunction r1 z arith code, ToArithFunction r0 f g) => (g -> arith) -> CodeGenModule (Function f)
- class CallIntrinsic a
Documentation
type TValue r a = CodeGenFunction r (Value a)Source
Synonym for CodeGenFunction r (Value a)
.
(?) :: IsFirstClass a => TValue r Bool -> (TValue r a, TValue r a) -> TValue r aSource
Conditional, returns first element of the pair when condition is true, otherwise second.
(??) :: (IsFirstClass a, CmpRet a) => TValue r (CmpResult a) -> (TValue r a, TValue r a) -> TValue r aSource
retrn :: Ret (Value a) r => TValue r a -> CodeGenFunction r ()Source
Return a value from an arithFunction
.
set :: TValue r a -> CodeGenFunction r (TValue r a)Source
Use x <- set $ ...
to make a binding.
class ArithFunction r z a b | a -> b r z, b r z -> aSource
ArithFunction r z b0 b1 => ArithFunction r z (CodeGenFunction r a -> b0) (a -> b1) | |
Ret a r => ArithFunction r a (CodeGenFunction r a) (CodeGenFunction r ()) |
arithFunction :: ArithFunction r z a b => a -> bSource
Unlift a function with TValue
to have Value
arguments.
class ToArithFunction r a b | a r -> b, b -> a rSource
ToArithFunction r (IO b) (CodeGenFunction r (Value b)) | |
ToArithFunction r b0 b1 => ToArithFunction r (a -> b0) (CodeGenFunction r (Value a) -> b1) |
toArithFunction :: ToArithFunction r f g => Function f -> gSource
Lift a function from having Value
arguments to having TValue
arguments.
recursiveFunction :: (IsFunction f, FunctionArgs f, code ~ FunctionCodeGen f, ArithFunction r1 z arith code, ToArithFunction r0 f g) => (g -> arith) -> CodeGenModule (Function f)Source
Define a recursive arithFunction
, gets passed itself as the first argument.
class CallIntrinsic a Source
CallIntrinsic Double | |
CallIntrinsic Float | |
(Positive n, IsPrimitive a, CallIntrinsic a) => CallIntrinsic (Vector n a) |