Safe Haskell | None |
---|
Useful control structures additionally to those in LLVM.Util.Loop.
- arrayLoop :: (Phi a, IsType b, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr b) -> a -> (Value (Ptr b) -> a -> CodeGenFunction r a) -> CodeGenFunction r a
- arrayLoop2 :: (Phi s, IsType a, IsType b, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr a) -> Value (Ptr b) -> s -> (Value (Ptr a) -> Value (Ptr b) -> s -> CodeGenFunction r s) -> CodeGenFunction r s
- arrayLoopWithExit :: (Phi s, IsType a, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr a) -> s -> (Value (Ptr a) -> s -> CodeGenFunction r (Value Bool, s)) -> CodeGenFunction r (Value i, s)
- arrayLoop2WithExit :: (Phi s, IsType a, IsType b, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr a) -> Value (Ptr b) -> s -> (Value (Ptr a) -> Value (Ptr b) -> s -> CodeGenFunction r (Value Bool, s)) -> CodeGenFunction r (Value i, s)
- fixedLengthLoop :: (Phi s, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> s -> (s -> CodeGenFunction r s) -> CodeGenFunction r s
- whileLoop :: Phi a => a -> (a -> CodeGenFunction r (Value Bool)) -> (a -> CodeGenFunction r a) -> CodeGenFunction r a
- whileLoopShared :: Phi a => a -> (a -> (CodeGenFunction r (Value Bool), CodeGenFunction r a)) -> CodeGenFunction r a
- loopWithExit :: Phi a => a -> (a -> CodeGenFunction r (Value Bool, b)) -> (b -> CodeGenFunction r a) -> CodeGenFunction r b
- ifThenElse :: Phi a => Value Bool -> CodeGenFunction r a -> CodeGenFunction r a -> CodeGenFunction r a
- ifThen :: Phi a => Value Bool -> a -> CodeGenFunction r a -> CodeGenFunction r a
- class Phi a => Select a where
- select :: Value Bool -> a -> a -> CodeGenFunction r a
- selectTraversable :: (Select a, Traversable f, Applicative f) => Value Bool -> f a -> f a -> CodeGenFunction r (f a)
- ifThenSelect :: Select a => Value Bool -> a -> CodeGenFunction r a -> CodeGenFunction r a
Documentation
arrayLoop :: (Phi a, IsType b, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr b) -> a -> (Value (Ptr b) -> a -> CodeGenFunction r a) -> CodeGenFunction r aSource
arrayLoop2 :: (Phi s, IsType a, IsType b, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr a) -> Value (Ptr b) -> s -> (Value (Ptr a) -> Value (Ptr b) -> s -> CodeGenFunction r s) -> CodeGenFunction r sSource
arrayLoopWithExit :: (Phi s, IsType a, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr a) -> s -> (Value (Ptr a) -> s -> CodeGenFunction r (Value Bool, s)) -> CodeGenFunction r (Value i, s)Source
arrayLoop2WithExit :: (Phi s, IsType a, IsType b, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> Value (Ptr a) -> Value (Ptr b) -> s -> (Value (Ptr a) -> Value (Ptr b) -> s -> CodeGenFunction r (Value Bool, s)) -> CodeGenFunction r (Value i, s)Source
fixedLengthLoop :: (Phi s, Num i, IsConst i, IsInteger i, CmpRet i, CmpResult i ~ Bool) => Value i -> s -> (s -> CodeGenFunction r s) -> CodeGenFunction r sSource
whileLoop :: Phi a => a -> (a -> CodeGenFunction r (Value Bool)) -> (a -> CodeGenFunction r a) -> CodeGenFunction r aSource
whileLoopShared :: Phi a => a -> (a -> (CodeGenFunction r (Value Bool), CodeGenFunction r a)) -> CodeGenFunction r aSource
This is a variant of whileLoop
that may be more convient,
because you only need one lambda expression
for both loop condition and loop body.
loopWithExit :: Phi a => a -> (a -> CodeGenFunction r (Value Bool, b)) -> (b -> CodeGenFunction r a) -> CodeGenFunction r bSource
This is a loop with a single point for exit from within the loop.
The Bool
value indicates whether the loop shall be continued.
ifThenElse :: Phi a => Value Bool -> CodeGenFunction r a -> CodeGenFunction r a -> CodeGenFunction r aSource
This construct starts new blocks,
so be prepared when continueing after an ifThenElse
.
ifThen :: Phi a => Value Bool -> a -> CodeGenFunction r a -> CodeGenFunction r aSource
selectTraversable :: (Select a, Traversable f, Applicative f) => Value Bool -> f a -> f a -> CodeGenFunction r (f a)Source
ifThenSelect :: Select a => Value Bool -> a -> CodeGenFunction r a -> CodeGenFunction r aSource