2024-07-10 17:46:18 +03:00
``` unison
2023-11-08 18:15:05 +03:00
unique type Foo = Bar Nat
```
2024-07-10 19:17:15 +03:00
``` ucm
2023-11-08 18:15:05 +03:00
2023-12-22 14:55:24 +03:00
Loading changes detected in scratch.u.
2023-11-08 18:15:05 +03:00
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 11:42:12 +03:00
type Foo
2023-11-08 18:15:05 +03:00
```
2024-07-10 19:17:15 +03:00
``` ucm
2024-06-12 01:22:09 +03:00
scratch/main> add
2023-11-08 18:15:05 +03:00
⍟ I've added these definitions:
2024-01-04 11:42:12 +03:00
type Foo
2023-11-08 18:15:05 +03:00
2024-06-12 01:22:09 +03:00
scratch/main> move.term Foo.Bar Stray.Bar
2023-11-08 18:15:05 +03:00
Done.
```
2023-11-14 20:21:40 +03:00
Now we've set up a situation where the constructor is not where it's supposed to be; it's somewhere else.
2024-07-10 17:46:18 +03:00
``` unison
2023-11-08 18:15:05 +03:00
unique type Foo = Bar Nat Nat
```
2024-07-10 19:17:15 +03:00
``` ucm
2023-11-08 18:15:05 +03:00
2023-12-22 14:55:24 +03:00
Loading changes detected in scratch.u.
2023-11-08 18:15:05 +03:00
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 11:42:12 +03:00
type Foo
2023-11-08 18:15:05 +03:00
```
2023-11-14 20:21:40 +03:00
Note that the constructor name shown here (implied to be called `Foo.Stray.Bar` ) doesn't really exist, it's just showing up due to a pretty-printer bug.
2024-07-10 19:17:15 +03:00
``` ucm
2024-06-12 01:22:09 +03:00
scratch/main> view Foo
2023-11-14 20:21:40 +03:00
2024-01-04 11:42:12 +03:00
type Foo = Stray.Bar Nat
2023-11-14 20:21:40 +03:00
2024-06-12 01:22:09 +03:00
scratch/main> update
2023-11-08 18:15:05 +03:00
2024-07-23 20:45:16 +03:00
Sorry, I wasn't able to perform the update:
The type Foo has some constructors with missing names, and I
can't perform an update in this situation.
2023-11-14 20:21:40 +03:00
You can use `view Foo` and
`alias.term <hash> Foo.<ConstructorName>` to give names to
2024-07-23 20:45:16 +03:00
each unnamed constructor, and then try the update again.
2023-11-14 20:21:40 +03:00
```