-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improvements to constraints (#896)
Closes partially #18 ### Summary of Changes * Remove lower type parameter bounds. We don't have a use case for them and they vastly complicated the implementation. For instance, `Nothing` is no subtype of a type parameter type with a lower bound other than `Nothing`. This means, when computing the highest common subtype (#860), we could only return `$unknown` for a type parameter type with a lower bound of, say, `Int`, and another type like `Number`. * Specify the upper bound of a type parameter directly where it's declared. Since they cannot also have a lower bound anymore and previously could only have a single, acyclic upper bound, we don't lose additional expressiveness this way. Previous type parameters may be used as the upper bound of later ones. The scope provider prevents forward references. * Add syntax, formatting and scoping for parameter bounds (#18). We are doing this in this PR, since we would otherwise not have constraints to test constraint lists with.
- Loading branch information
1 parent
7e0dc3f
commit b81bef9
Showing
81 changed files
with
668 additions
and
1,654 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,6 @@ | |
"not", | ||
"or", | ||
"sub", | ||
"super", | ||
) | ||
|
||
builtins = ( | ||
|
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.