-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add coercions to make polymorphic variants easier to use.
We coerce variable initialisations, plain assignments, and function returns, when the type of the variable or function return are explicitly specified. Assignments and initialisation ONLY allow polymorphic variants to be coerced, however function returns use fully general subtyping coercions, because the code to insert the coercion in that case is in the desugaring routine early in the compilation process before binding.
- Loading branch information
Showing
8 changed files
with
189 additions
and
58 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
Oops, something went wrong.