Safe Haskell | None |
---|
LLVM counterpart to Either
datatype.
- data T a b = Cons {}
- run :: Phi c => T a b -> (a -> CodeGenFunction r c) -> (b -> CodeGenFunction r c) -> CodeGenFunction r c
- getIsLeft :: T a b -> CodeGenFunction r (Value Bool)
- mapLeft :: (a0 -> a1) -> T a0 b -> T a1 b
- mapRight :: (b0 -> b1) -> T a b0 -> T a b1
- left :: Undefined b => a -> T a b
- right :: Undefined a => b -> T a b
Documentation
If isRight
, then fromLeft
is an undefTuple
.
If not isRight
, then fromRight
is an undefTuple
.
I would prefer a union type,
but it was temporarily removed in LLVM-2.8 and did not return since then.