2022-02-16 11:39:21 +03:00
|
|
|
|
|
|
|
```ucm:hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge
|
2022-02-16 11:39:21 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Some random ability stuff to ensure things work.
|
|
|
|
|
|
|
|
```unison
|
|
|
|
|
|
|
|
unique ability A where
|
|
|
|
one : Nat ->{A} Nat
|
|
|
|
two : Nat -> Nat ->{A} Nat
|
|
|
|
three : Nat -> Nat -> Nat ->{A} Nat
|
|
|
|
four : Nat ->{A} (Nat -> Nat -> Nat -> Nat)
|
|
|
|
|
|
|
|
ha : Request {A} r -> r
|
|
|
|
ha = cases
|
|
|
|
{ x } -> x
|
|
|
|
{ one i -> c } -> handle c (i+1) with ha
|
|
|
|
{ two i j -> c } -> handle c (i+j) with ha
|
|
|
|
{ three i j k -> c } -> handle c (i+j+k) with ha
|
|
|
|
{ four i -> c } -> handle c (j k l -> i+j+k+l) with ha
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2022-02-16 11:39:21 +03:00
|
|
|
```
|