llvm-tf-3.1.2: Bindings to the LLVM compiler toolkit using type families.

Safe HaskellNone

LLVM.Util.Arithmetic

Synopsis

Documentation

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

Synonym for CodeGenFunction r (Value a).

(%==) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)Source

Comparison functions.

(%/=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)Source

Comparison functions.

(%<) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)Source

Comparison functions.

(%<=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)Source

Comparison functions.

(%>) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)Source

Comparison functions.

(%>=) :: CmpRet a => TValue r a -> TValue r a -> TValue r (CmpResult a)Source

Comparison functions.

(%&&) :: 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) => 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

Instances

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

Instances

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.