| 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' a
- type CompiledClauses = CompiledClauses' Term
- litCase :: Literal -> c -> Case c
- conCase :: QName -> WithArity c -> Case c
- projCase :: QName -> c -> Case c
- catchAll :: c -> Case c
- hasCatchAll :: CompiledClauses -> Bool
- prettyMap :: (Pretty k, Pretty v) => Map k v -> [Doc]
Documentation
Instances
| Functor WithArity # | |
| Foldable WithArity # | |
| Traversable WithArity # | |
| Data c => Data (WithArity c) # | |
| Show c => Show (WithArity c) # | |
| Semigroup c => Semigroup (WithArity c) # | |
| (Semigroup c, Monoid c) => Monoid (WithArity c) # | |
| Pretty a => Pretty (WithArity a) # | |
| KillRange c => KillRange (WithArity c) # | |
| TermLike a => TermLike (WithArity a) # | |
| NamesIn a => NamesIn (WithArity a) # | |
| InstantiateFull a => InstantiateFull (WithArity a) # | |
Branches in a case tree.
Constructors
| Branches | |
Fields
| |
Instances
| Functor Case # | |
| Foldable Case # | |
| Traversable Case # | |
| Data c => Data (Case c) # | |
| Show c => Show (Case c) # | |
| Semigroup m => Semigroup (Case m) # | |
| (Semigroup m, Monoid m) => Monoid (Case m) # | |
| Null (Case m) # | |
| Pretty a => Pretty (Case a) # | |
| KillRange c => KillRange (Case c) # | |
| TermLike a => TermLike (Case a) # | |
| NamesIn a => NamesIn (Case a) # | |
| InstantiateFull a => InstantiateFull (Case a) # | |
data CompiledClauses' a #
Case tree with bodies.
Constructors
| Case (Arg Int) (Case (CompiledClauses' a)) |
|
| Done [Arg ArgName] a |
|
| Fail | Absurd case. |
Instances
| Functor CompiledClauses' # | |
| Foldable CompiledClauses' # | |
| Traversable CompiledClauses' # | |
| Pretty CompiledClauses # | |
| KillRange CompiledClauses # | |
| NamesIn CompiledClauses # | |
| InstantiateFull CompiledClauses # | |
| DropArgs CompiledClauses # | To drop the first |
| Data a => Data (CompiledClauses' a) # | |
| Show a => Show (CompiledClauses' a) # | |
| TermLike a => TermLike (CompiledClauses' a) # | |
type CompiledClauses = CompiledClauses' Term #
hasCatchAll :: CompiledClauses -> Bool #
Check whether a case tree has a catch-all clause.