unison/unison-src/transcripts/fix2334.output.md

49 lines
769 B
Markdown
Raw Permalink Normal View History

Tests an issue where pattern matching matrices involving built-in
types was discarding default cases in some branches.
``` unison
f = cases
0, 0 -> 0
_, 1 -> 2
1, _ -> 3
_, _ -> 1
> f 0 0
> f 1 0
> f 0 1
> f 1 1
```
``` ucm
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
f : Nat -> Nat -> Nat
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
7 | > f 0 0
0
8 | > f 1 0
3
9 | > f 0 1
2
10 | > f 1 1
2
```