Safe Haskell | None |
---|---|
Language | Haskell98 |
Case trees.
After coverage checking, pattern matching is translated to case trees, i.e., a tree of successive case splits on one variable at a time.
- data WithArity c = WithArity {}
- data Case c = Branches {
- conBranches :: Map QName (WithArity c)
- litBranches :: Map Literal c
- catchAllBranch :: Maybe c
- data CompiledClauses
- emptyBranches :: Case CompiledClauses
- litCase :: Literal -> c -> Case c
- conCase :: QName -> WithArity c -> Case c
- catchAll :: c -> Case c
- prettyMap :: (Show k, Pretty v) => Map k v -> [Doc]
Documentation
Functor WithArity Source | |
Foldable WithArity Source | |
Traversable WithArity Source | |
Monoid c => Monoid (WithArity c) Source | |
Pretty a => Pretty (WithArity a) Source | |
Abstract a => Abstract (WithArity a) Source | |
Apply a => Apply (WithArity a) Source | |
EmbPrj a => EmbPrj (WithArity a) Source | |
InstantiateFull a => InstantiateFull (WithArity a) Source |
Branches in a case tree.
Branches | |
|
Functor Case Source | |
Foldable Case Source | |
Traversable Case Source | |
Pretty a => Show (Case a) Source | |
Monoid m => Monoid (Case m) Source | |
Pretty a => Pretty (Case a) Source | |
Abstract a => Abstract (Case a) Source | |
Apply a => Apply (Case a) Source | |
EmbPrj a => EmbPrj (Case a) Source | |
InstantiateFull a => InstantiateFull (Case a) Source |
data CompiledClauses Source
Case tree with bodies.
Case Int (Case CompiledClauses) |
|
Done [Arg ArgName] Term |
|
Fail | Absurd case. |
Show CompiledClauses Source | |
Pretty CompiledClauses Source | |
Abstract CompiledClauses Source | |
Apply CompiledClauses Source | |
EmbPrj CompiledClauses Source | |
InstantiateFull CompiledClauses Source | |
DropArgs CompiledClauses Source | To drop the first |