unison/unison-src/transcripts/update-type-constructor-alias.output.md
2024-07-23 13:45:16 -04:00

63 lines
1.1 KiB
Markdown

``` unison
unique type Foo = Bar Nat
```
``` ucm
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`:
type Foo
```
``` ucm
scratch/main> add
⍟ I've added these definitions:
type Foo
scratch/main> alias.term Foo.Bar Foo.BarAlias
Done.
```
``` unison
unique type Foo = Bar Nat Nat
```
``` ucm
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:
type Foo
```
``` ucm
scratch/main> update
Sorry, I wasn't able to perform the update:
The type Foo has a constructor with multiple names, and I
can't perform an update in this situation:
* Foo.Bar
* Foo.BarAlias
Please delete all but one name for each constructor, and then
try updating again.
```