-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor type_descriptions in the typing env
For new datatype definitions the typer records "declarations", which are mostly direct information obtained from the program source, and "descriptions", which contains lower-level, computed information on data representation (constructor tags, record field offsets). Before this PR, the type used to define datatype descriptions was type type_descriptions = constructor_description list * label_description list which basically assumes that a datatype may have both constructors and labels, which is nonsensical. The current refactoring uses a variant instead of a product here, following the existing structure of the 'type_kind' field of declarations. This avoids having to use empty lists in impossible configurations, and makes the code less surprising.
- Loading branch information
Nicolas Chataing
committed
May 6, 2021
1 parent
6275c0c
commit 3cccfa5
Showing
9 changed files
with
174 additions
and
127 deletions.
There are no files selected for viewing
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
Oops, something went wrong.