Restrictioncore-irredundancy
Irredundancy. In a match whose patterns elaborate with type , each must cover some inhabitant of that no with covers.
Tests (4)
- elm / CaseCharEscapedDuplicateTestA `case` on Char with two patterns for the same character written differently ('a' and '\u{0061}'): the second can never match, so it is a redundant pattern.
- elm / RedundantPatternABranchAfterAWildcardTestA `case` branch placed after a wildcard branch is rejected with a REDUNDANT PATTERN error.
- elm / StandardA97NeverErrBranchTestA branch for the error of a `Result Never a` is not redundant.
- elm / StandardA97SelfOnlyTypeTestMatches on a type whose one constructor takes the type itself.
Discussions
Discuss this restriction·Search the discussions on GitHub
Discussions are on GitHub; one about this restriction has [res:core-irredundancy] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.