-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement and use a new RecordMap type.
This type stores records as a finite map from field names to values, while also remembering the original order of the fields from when the record was generated (usually, from the program source). For all "semantic" purposes, the fields are treated as appearing in a canoical order (in sorted order of the field names). However, for user display purposes, records are presented in the order in which the fields were originally stated. In the course of implementing this, I discovered that we were not previously checking for repeated fields in the parser or typechecker, which would result in some rather strange situations and could probably be used to break the type safety. This is now fixed and repeated fields will result in either a parse error or a panic (for records generated internally). Fixes #706
- Loading branch information
1 parent
87d5eda
commit 6c6cb94
Showing
43 changed files
with
474 additions
and
277 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
Oops, something went wrong.