unison
unison copied to clipboard
Type ascriptions can break the parser
Describe and demonstrate the bug
``` ucm
> builtins.merge
Done.
```
``` unison
> 3
```
``` ucm :added-by-ucm
Loading changes detected in scratch.u.
No changes found.
1 | > 3
⧩
3
```
``` unison
> (3 : Nat)
```
``` ucm :added-by-ucm
Loading changes detected in scratch.u.
No changes found.
1 | > (3 : Nat)
⧩
3
```
``` unison
> 3 : Nat
```
🛑
The transcript failed due to an error in the stanza above. The error is:
```
I got confused here:
1 | > 3 : Nat
I was surprised to find a ':' here.
I was expecting one of these instead:
* and
* bang
* do
* false
* force
* handle
* if
* infixApp
* let
* newline or semicolon
* or
* quote
* termLink
* true
* tuple
* typeLink
```
Environment (please complete the following information):
ucm --versiona330f6040
Additional context
The term Unit.doc in base currently doesn't compile because it has a similar code block inside a doc literal.