2021-08-10 21:10:46 +03:00
|
|
|
Tests for a TDNR case that wasn't working. The code wasn't 'relaxing'
|
|
|
|
inferred types that didn't contain arrows, so effects that just yield
|
|
|
|
a value weren't getting disambiguated.
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2021-08-10 21:10:46 +03:00
|
|
|
unique ability A where
|
|
|
|
a : Nat
|
|
|
|
|
|
|
|
unique ability B where
|
|
|
|
a : Char
|
|
|
|
|
2023-07-21 09:12:22 +03:00
|
|
|
test : () -> Nat
|
2021-08-10 21:10:46 +03:00
|
|
|
test _ =
|
|
|
|
x = a
|
|
|
|
toNat x
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2021-08-10 21:10:46 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2021-08-10 21:10:46 +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`:
|
|
|
|
|
2024-01-04 11:42:12 +03:00
|
|
|
ability A
|
|
|
|
ability B
|
2021-08-10 21:10:46 +03:00
|
|
|
test : '{B} Nat
|
|
|
|
|
|
|
|
```
|