Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
This is an internal relapse module.
It contains multiple implementations of if expressions.
Synopsis
- data IfExprs
- data IfExpr
- newIfExpr :: Expr Bool -> Pattern -> Pattern -> IfExpr
- evalIfExprs :: IfExprs -> Label -> Either String [Pattern]
- compileIfExprs :: [IfExpr] -> IfExprs
- data ZippedIfExprs
- zipIfExprs :: IfExprs -> ZippedIfExprs
- evalZippedIfExprs :: ZippedIfExprs -> Label -> Either String ([Pattern], Zipper)
Documentation
IfExprs is a tree of if expressions, which contains a list of resulting patterns on each of its leaves.
evalIfExprs :: IfExprs -> Label -> Either String [Pattern] Source #
valIfExprs evaluates a tree of if expressions and returns the resulting patterns or an error.
compileIfExprs :: [IfExpr] -> IfExprs Source #
compileIfExprs compiles a list of if expressions in an IfExprs tree, for efficient evaluation.
data ZippedIfExprs Source #
ZippedIfExprs is a tree of if expressions, but with a zipped pattern list and a zipper on each of the leaves.
zipIfExprs :: IfExprs -> ZippedIfExprs Source #
zipIfExprs compresses an if expression tree's leaves.
evalZippedIfExprs :: ZippedIfExprs -> Label -> Either String ([Pattern], Zipper) Source #
evalZippedIfExprs evaulates a ZippedIfExprs tree and returns the zipped pattern list and zipper from the resulting leaf.