2023-11-08 17:33:42 +03:00
|
|
|
```ucm:hide
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> builtins.merge lib.builtin
|
2023-11-08 17:16:19 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
2023-11-08 17:33:42 +03:00
|
|
|
unique type Foo
|
2023-11-08 17:16:19 +03:00
|
|
|
= Bar Nat
|
|
|
|
| Baz Nat Nat
|
|
|
|
|
|
|
|
foo : Foo -> Nat
|
|
|
|
foo = cases
|
|
|
|
Bar n -> n
|
|
|
|
Baz n m -> n + m
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2023-11-08 17:16:19 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
2023-11-08 17:33:42 +03:00
|
|
|
unique type Foo
|
2023-11-08 17:16:19 +03:00
|
|
|
= Bar Nat
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm:error
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> update
|
2023-11-08 17:16:19 +03:00
|
|
|
```
|