Transcript for mismatched arities.

This commit is contained in:
Chris Penner 2022-02-17 12:44:22 -06:00
parent 8af3ad47b0
commit f8a15c1c05
2 changed files with 54 additions and 1 deletions

View File

@ -59,18 +59,34 @@ foo = then -- unclosed
foo = with -- unclosed
```
### Matching
```unison:error
foo = match 1 with
2 -- no right-hand-side
```
```unison:error
-- Mismatched arities
foo = cases
1, 2 -> ()
3 -> ()
```
### Watches
```unison:error
-- Empty watch
>
```
### Keywords
```unison:error
use.keyword.in.namespace = 1
```
```unison:error
-- reserved operator
a ! b = 1

View File

@ -159,6 +159,8 @@ foo = with -- unclosed
```
### Matching
```unison
foo = match 1 with
2 -- no right-hand-side
@ -170,9 +172,44 @@ foo = match 1 with
I expected some patterns after a match / with but I didn't
find any.
1 | foo = match 1 with
```
```unison
-- Mismatched arities
foo = cases
1, 2 -> ()
3 -> ()
```
```ucm
😶
Not all the branches of this pattern matching have the same
number of arguments. I was assuming they'd all have 2
arguments (based on the previous patterns) but this one has
1 arguments:
4 | 3 -> ()
```
### Watches
```unison
-- Empty watch
>
```
```ucm
I expected a non-empty watch expression and not just ">"
2 | >
```
### Keywords