Safe Haskell | None |
---|---|
Language | Haskell98 |
Desugar match expressions to case expressions.
In a match expression if matching fails in one block of guards then we skip to the next block. This introduces join point at the start of every block of guards execpt the first one, which we need to flatten out when converting to plain case expressions.
We also merge multiple clauses for the same function into a single one while we're here.
Documentation
type S = State (Text, Int) Source #
State holding a variable name prefix and counter to create fresh variable names.
evalState :: Text -> S a -> a Source #
Evaluate a desguaring computation, using the given prefix for freshly introduced variables.