Safe Haskell | None |
---|---|
Language | Haskell98 |
| Module for exhaustivity checking over pattern matching definitions | The algorithm analyses the clauses of a definition one by one from top | to bottom, where in each step it has the cases already missing (uncovered), | and it generates the new set of missing cases.
- checkExhaustive :: forall m. MonadWriter MultipleErrors m => Environment -> ModuleName -> [CaseAlternative] -> m ()
- checkExhaustiveModule :: forall m. (Applicative m, MonadWriter MultipleErrors m) => Environment -> Module -> m ()
Documentation
checkExhaustive :: forall m. MonadWriter MultipleErrors m => Environment -> ModuleName -> [CaseAlternative] -> m () Source
Main exhaustivity checking function Starting with the set `uncovered = { _ }` (nothing covered, one `_` for each function argument), it partitions that set with the new uncovered cases, until it consumes the whole set of clauses. Then, returns the uncovered set of case alternatives.
checkExhaustiveModule :: forall m. (Applicative m, MonadWriter MultipleErrors m) => Environment -> Module -> m () Source
Exhaustivity checking over a single module