- type TValue r a = CodeGenFunction r (Value a)
- class CmpRet a b => Cmp a b | a -> b where
- cmp :: IntPredicate -> Value a -> Value a -> TValue r b
- (%==) :: CmpRet a b => TValue r a -> TValue r a -> TValue r b
- (%/=) :: CmpRet a b => TValue r a -> TValue r a -> TValue r b
- (%<) :: CmpRet a b => TValue r a -> TValue r a -> TValue r b
- (%<=) :: CmpRet a b => TValue r a -> TValue r a -> TValue r b
- (%>) :: CmpRet a b => TValue r a -> TValue r a -> TValue r b
- (%>=) :: CmpRet a b => TValue r a -> TValue r a -> TValue r b
- (%&&) :: 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 b) => TValue r b -> (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 a b | a -> b, b -> a
- arithFunction :: ArithFunction a b => a -> b
- class (UncurryN a (a1 -> CodeGenFunction r b1), LiftTuple r a1 b, UncurryN a2 (b -> CodeGenFunction r b1)) => UnwrapArgs a a1 b1 b a2 r | a -> a1 b1, a1 b1 -> a, a1 -> b, b -> a1, a2 -> b b1, b b1 -> a2
- toArithFunction :: (CallArgs f g, UnwrapArgs a a1 b1 b g r) => Function f -> a
- recursiveFunction :: (CallArgs a g, UnwrapArgs a11 a1 b1 b g r, FunctionArgs a a2 (CodeGenFunction r1 ()), ArithFunction a3 a2, IsFunction a) => (a11 -> a3) -> CodeGenModule (Function a)
- 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.
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 a b | a -> b, b -> aSource
ArithFunction b b' => ArithFunction (CodeGenFunction r a -> b) (a -> b') | |
Ret a r => ArithFunction (CodeGenFunction r a) (CodeGenFunction r ()) |
arithFunction :: ArithFunction a b => a -> bSource
Unlift a function with TValue
to have Value
arguments.
class (UncurryN a (a1 -> CodeGenFunction r b1), LiftTuple r a1 b, UncurryN a2 (b -> CodeGenFunction r b1)) => UnwrapArgs a a1 b1 b a2 r | a -> a1 b1, a1 b1 -> a, a1 -> b, b -> a1, a2 -> b b1, b b1 -> a2Source
(UncurryN a (a1 -> CodeGenFunction r b1), LiftTuple r a1 b, UncurryN a2 (b -> CodeGenFunction r b1)) => UnwrapArgs a a1 b1 b a2 r |
toArithFunction :: (CallArgs f g, UnwrapArgs a a1 b1 b g r) => Function f -> aSource
Lift a function from having Value
arguments to having TValue
arguments.
recursiveFunction :: (CallArgs a g, UnwrapArgs a11 a1 b1 b g r, FunctionArgs a a2 (CodeGenFunction r1 ()), ArithFunction a3 a2, IsFunction a) => (a11 -> a3) -> CodeGenModule (Function a)Source
Define a recursive arithFunction
, gets passed itself as the first argument.
class CallIntrinsic a Source
CallIntrinsic Double | |
CallIntrinsic Float | |
(Pos n, IsPrimitive a, CallIntrinsic a) => CallIntrinsic (Vector n a) |