| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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 => Semigroup (WithArity c) Source # | |
| Monoid c => Monoid (WithArity c) Source # | |
| Pretty a => Pretty (WithArity a) Source # | |
| KillRange c => KillRange (WithArity c) Source # | |
| NamesIn a => NamesIn (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 => Semigroup (Case m) Source # | |
| Monoid m => Monoid (Case m) Source # | |
| Pretty a => Pretty (Case a) Source # | |
| Null (Case m) Source # | |
| KillRange c => KillRange (Case c) Source # | |
| NamesIn a => NamesIn (Case a) Source # | |
| InstantiateFull a => InstantiateFull (Case a) Source # | |
data CompiledClauses Source #
Case tree with bodies.
Constructors
| Case (Arg Int) (Case CompiledClauses) |
|
| Done [Arg ArgName] Term |
|
| Fail | Absurd case. |
Instances
| Show CompiledClauses Source # | |
| Pretty CompiledClauses Source # | |
| KillRange CompiledClauses Source # | |
| NamesIn CompiledClauses Source # | |
| DropArgs CompiledClauses Source # | To drop the first |
| InstantiateFull CompiledClauses Source # | |
hasCatchAll :: CompiledClauses -> Bool Source #
Check whether a case tree has a catch-all clause.