-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add record constructor to subtyping #2007
Merged
Merged
Commits on Aug 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for da2e4af - Browse repository at this point
Copy the full SHA da2e4afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5897969 - Browse repository at this point
Copy the full SHA 5897969View commit details -
Configuration menu - View commit details
-
Copy full SHA for 186ca8d - Browse repository at this point
Copy the full SHA 186ca8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f795609 - Browse repository at this point
Copy the full SHA f795609View commit details -
Copy comments (general comment on subsumption and closing a record wh…
…en there is a record/dictionary subsumption)
Configuration menu - View commit details
-
Copy full SHA for 4c74bb6 - Browse repository at this point
Copy the full SHA 4c74bb6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f832319 - Browse repository at this point
Copy the full SHA f832319View commit details -
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3e6b4b6 - Browse repository at this point
Copy the full SHA 3e6b4b6View commit details -
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ca781bb - Browse repository at this point
Copy the full SHA ca781bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e95840 - Browse repository at this point
Copy the full SHA 6e95840View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9e4f5a - Browse repository at this point
Copy the full SHA c9e4f5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dbc986 - Browse repository at this point
Copy the full SHA 0dbc986View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49f6bdf - Browse repository at this point
Copy the full SHA 49f6bdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for b09a6d6 - Browse repository at this point
Copy the full SHA b09a6d6View commit details
Commits on Aug 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for de31fce - Browse repository at this point
Copy the full SHA de31fceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 264e067 - Browse repository at this point
Copy the full SHA 264e067View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4afcad2 - Browse repository at this point
Copy the full SHA 4afcad2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34ad290 - Browse repository at this point
Copy the full SHA 34ad290View commit details
Commits on Aug 9, 2024
-
Update comments core/src/typecheck/subtyping.rs
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e739173 - Browse repository at this point
Copy the full SHA e739173View commit details -
Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 90f33ea - Browse repository at this point
Copy the full SHA 90f33eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa5e76a - Browse repository at this point
Copy the full SHA fa5e76aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5405ee2 - Browse repository at this point
Copy the full SHA 5405ee2View commit details -
Configuration menu - View commit details
-
Copy full SHA for edae4f2 - Browse repository at this point
Copy the full SHA edae4f2View commit details
Commits on Sep 6, 2024
-
This commit performs minor cosmetic improvements in the code handling subtyping, mostly around comments and function interfaces.
Configuration menu - View commit details
-
Copy full SHA for f9fba13 - Browse repository at this point
Copy the full SHA f9fba13View commit details -
The support of subtyping for record types makes some types to be instantiated earlier than before. Given the way terms are visited, when writing something like `let f = std.array.map in ..`, `std.array.map` used to be inferred to be of a polymorphic type `forall a b. ...` and then only was instantiated (because record access is inferred, while the bound expression is checked). With the new implementation, it is instantiated as part of the subsumption rule, meaning that it'll appear differently on the LSP. All in all, both version of the data shown by the LSP (before this change and after) are meaningful, in some sense. The polymorphic type is still shown when it's part of the metadata anyway, in addition to the inferred monomorphic type. This also doesn't change which expressions are accepted or not. It's more of an artifact of when we visit terms, before or after instantiation and how those visits are intertwined with `check` and `infer`. It's not easy to revert to the previous state of affairs, and it's in fact not necessarily a good thing either: in the example above, the LSP would also show a polymorphic type for `f` - the one of `map` - while in fact `f` has a monomorphic type, so you couldn't use it in different contexts (say on an `Array Number` and later on a `Array String`). The current version is showing the real monomorphic nature of `f`.
Configuration menu - View commit details
-
Copy full SHA for 1b699be - Browse repository at this point
Copy the full SHA 1b699beView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.