llvm-0.9.1.2: Bindings to the LLVM compiler toolkit.

LLVM.Util.Arithmetic

Synopsis

Documentation

type TValue r a = CodeGenFunction r (Value a)Source

Synonym for CodeGenFunction r (Value a).

(%==) :: CmpRet a b => TValue r a -> TValue r a -> TValue r bSource

(%/=) :: CmpRet a b => TValue r a -> TValue r a -> TValue r bSource

Comparison functions.

(%<) :: CmpRet a b => TValue r a -> TValue r a -> TValue r bSource

(%<=) :: CmpRet a b => TValue r a -> TValue r a -> TValue r bSource

(%>) :: CmpRet a b => TValue r a -> TValue r a -> TValue r bSource

(%>=) :: CmpRet a b => TValue r a -> TValue r a -> TValue r bSource

(%&&) :: TValue r Bool -> TValue r Bool -> TValue r BoolSource

Lazy and.

(%||) :: TValue r Bool -> TValue r Bool -> TValue r BoolSource

Lazy or.

(?) :: 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 b) => TValue r b -> (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 a b | a -> b, b -> aSource

Instances

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

Instances

(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.