-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current design of structural ADTs is to clearly separate syntactically unapplied variants (enum tags) from enum variants with an argument, both when constructing them or when deconstructing them (pattern matching). However, the previous handling of row conflicts would still forbid types like [| 'Foo, 'Foo Number |]. Because they are constructed separately, and because they can be matched on separately, this type is actually unproblematic. Thus, this commit relaxes the notion of row conflicts for enums by basically ignoring unapplied enum rows (corresponding to enum tags) within enum row types. This makes it possible to typecheck expressions like `match { 'Foo => .., 'Foo x => ..}`
- Loading branch information
Showing
21 changed files
with
160 additions
and
151 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
cli/tests/snapshot/inputs/errors/enum_contract_shape_mismatch.ncl
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
cli/tests/snapshot/inputs/errors/enum_contract_shape_mismatch_rev.ncl
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
cli/tests/snapshot/snapshots/snapshot__eval_stderr_enum_contract_shape_mismatch.ncl.snap
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
cli/tests/snapshot/snapshots/snapshot__eval_stderr_enum_contract_shape_mismatch_rev.ncl.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.