mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-19 06:17:33 +03:00
Transcript for mismatched arities.
This commit is contained in:
parent
8af3ad47b0
commit
f8a15c1c05
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user