2022-07-26 19:26:54 +03:00
|
|
|
Tests a case where concrete abilities were appearing multiple times in an
|
|
|
|
inferred type. This was due to the pre-pass that figures out which abilities
|
|
|
|
are being matched on. It was just concatenating the ability for each pattern
|
|
|
|
into a list, and not checking whether there were duplicates.
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2022-07-26 19:26:54 +03:00
|
|
|
structural ability T where
|
|
|
|
nat : Nat
|
|
|
|
int : Int
|
|
|
|
flo : Float
|
|
|
|
|
|
|
|
f = cases
|
|
|
|
{nat -> k} -> 5
|
|
|
|
{int -> k} -> 5
|
|
|
|
{flo -> k} -> 5
|
|
|
|
{x} -> 5
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2022-07-26 19:26:54 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2022-07-26 19:26:54 +03:00
|
|
|
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`:
|
|
|
|
|
|
|
|
structural ability T
|
|
|
|
f : Request {g, T} x -> Nat
|
|
|
|
|
|
|
|
```
|