2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2024-01-03 21:55:01 +03:00
|
|
|
unique type Foo = Foo1
|
|
|
|
unique type Bar = X Foo
|
|
|
|
unique type Baz = X Foo
|
|
|
|
|
|
|
|
useBar : Bar -> Nat
|
|
|
|
useBar = cases
|
|
|
|
Bar.X _ -> 1
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-03 21:55:01 +03:00
|
|
|
|
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
|
|
|
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 12:17:41 +03:00
|
|
|
type Bar
|
|
|
|
type Baz
|
|
|
|
type Foo
|
2024-01-03 21:55:01 +03:00
|
|
|
useBar : Bar -> Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-03 21:55:01 +03:00
|
|
|
myproject/main> add
|
|
|
|
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
2024-01-04 12:17:41 +03:00
|
|
|
type Bar
|
|
|
|
type Baz
|
|
|
|
type Foo
|
2024-01-03 21:55:01 +03:00
|
|
|
useBar : Bar -> Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2024-01-03 21:55:01 +03:00
|
|
|
unique type Foo = Foo1 | Foo2
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-03 21:55:01 +03:00
|
|
|
|
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
|
|
|
I found and typechecked these definitions in scratch.u. If you
|
|
|
|
do an `add` or `update`, here's how your codebase would
|
|
|
|
change:
|
|
|
|
|
|
|
|
⍟ These names already exist. You can `update` them to your
|
|
|
|
new definition:
|
|
|
|
|
2024-01-04 12:17:41 +03:00
|
|
|
type Foo
|
2024-01-03 21:55:01 +03:00
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-01-03 21:55:01 +03:00
|
|
|
myproject/main> update
|
|
|
|
|
|
|
|
Okay, I'm searching the branch for code that needs to be
|
|
|
|
updated...
|
|
|
|
|
|
|
|
That's done. Now I'm making sure everything typechecks...
|
|
|
|
|
|
|
|
Everything typechecks, so I'm saving the results...
|
|
|
|
|
|
|
|
Done.
|
|
|
|
|
|
|
|
```
|