| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Agda.TypeChecking.CompiledClause
Description
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 {
- projPatterns :: Bool
- conBranches :: Map QName (WithArity c)
- litBranches :: Map Literal c
- catchAllBranch :: Maybe c
- data CompiledClauses
- litCase :: Literal -> c -> Case c
- conCase :: QName -> WithArity c -> Case c
- projCase :: QName -> c -> Case c
- catchAll :: c -> Case c
- hasCatchAll :: CompiledClauses -> Bool
- prettyMap :: (Show k, Pretty v) => Map k v -> [Doc]
Documentation
Instances
| Functor WithArity Source | |
| Foldable WithArity Source | |
| Traversable WithArity Source | |
| Monoid c => Monoid (WithArity c) Source | |
| Pretty a => Pretty (WithArity a) Source | |
| KillRange c => KillRange (WithArity c) 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.
Constructors
| Branches | |
Fields
| |
Instances
| Functor Case Source | |
| Foldable Case Source | |
| Traversable Case Source | |
| Pretty a => Show (Case a) Source | |
| Monoid m => Monoid (Case m) Source | |
| Null (Case m) Source | |
| Pretty a => Pretty (Case a) Source | |
| KillRange c => KillRange (Case c) 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.
Constructors
| Case Int (Case CompiledClauses) |
|
| Done [Arg ArgName] Term |
|
| Fail | Absurd case. |
Instances
| Show CompiledClauses Source | |
| Pretty CompiledClauses Source | |
| KillRange CompiledClauses Source | |
| Abstract CompiledClauses Source | |
| Apply CompiledClauses Source | |
| EmbPrj CompiledClauses Source | |
| InstantiateFull CompiledClauses Source | |
| DropArgs CompiledClauses Source | To drop the first |
hasCatchAll :: CompiledClauses -> Bool Source
Check whether a case tree has a catch-all clause.