-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify type signature declaration syntax (#3178)
* Closes #2990 * Allows type signatures for constructors, record fields and axioms to have the same form as in function definitions, e.g., ``` field {A} {{M A}} (arg1 arg2 : A) : List A ``` * For constructors, this introduces an ambiguity between record and GADT syntax with names. For example, ``` ctr { A : Type } ``` can be confused by the parser with initial part of GADT type signature: ``` ctr {A : Type} : A -> C A ``` For now, this is resolved by preferring the record syntax. Hence, it's currently not possible to use type signatures with implicit arguments for constructors. Ultimately, the `@` in record syntax should be made mandatory, which would resolve the ambiguity: ``` ctr@{ A : Type } ``` --------- Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
- Loading branch information
1 parent
8658420
commit 2e38aa6
Showing
15 changed files
with
333 additions
and
162 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.