1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-02 10:47:32 +03:00
juvix/include
Łukasz Czajka 2e38aa609f
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>
2024-11-20 15:57:15 +00:00
..
anoma Launch the Anoma node and client from the elixir REPL (#3172) 2024-11-14 09:10:00 +01:00
latex Export Juvix source code to latex (#2917) 2024-08-05 11:28:19 +02:00
package Unify type signature declaration syntax (#3178) 2024-11-20 15:57:15 +00:00
package-base/Juvix/Builtin Update standard library coding style according to the guidelines (#3092) 2024-10-14 15:56:54 +02:00