mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
28 lines
290 B
Markdown
28 lines
290 B
Markdown
```ucm:hide
|
|
scratch/main> builtins.merge lib.builtin
|
|
```
|
|
|
|
```unison
|
|
unique type Foo
|
|
= Bar Nat
|
|
| Baz Nat Nat
|
|
|
|
foo : Foo -> Nat
|
|
foo = cases
|
|
Bar n -> n
|
|
Baz n m -> n + m
|
|
```
|
|
|
|
```ucm
|
|
scratch/main> add
|
|
```
|
|
|
|
```unison
|
|
unique type Foo
|
|
= Bar Nat
|
|
```
|
|
|
|
```ucm:error
|
|
scratch/main> update
|
|
```
|