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 = Bar Nat
|
2023-11-08 17:16:19 +03:00
|
|
|
|
|
|
|
makeFoo : Nat -> Foo
|
|
|
|
makeFoo n = Bar (n+10)
|
|
|
|
```
|
|
|
|
|
|
|
|
```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 = internal.Bar Nat
|
2023-11-08 17:16:19 +03:00
|
|
|
|
|
|
|
Foo.Bar : Nat -> Foo
|
|
|
|
Foo.Bar n = internal.Bar n
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> update
|
|
|
|
scratch/main> view Foo
|
|
|
|
scratch/main> find.verbose
|
2023-11-08 17:16:19 +03:00
|
|
|
```
|