mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
47 lines
705 B
Markdown
47 lines
705 B
Markdown
This transcript demonstrates that unique types no longer always get a fresh GUID: they share GUIDs with already-saved
|
|
unique types of the same name.
|
|
|
|
```unison
|
|
unique type A = A
|
|
|
|
unique type B = B C
|
|
unique type C = C B
|
|
```
|
|
|
|
```ucm
|
|
scratch/main> add
|
|
```
|
|
|
|
```unison
|
|
unique type A = A
|
|
|
|
unique type B = B C
|
|
unique type C = C B
|
|
```
|
|
|
|
If the name stays the same, the churn is even prevented if the type is updated and then reverted to the original form.
|
|
|
|
```ucm
|
|
scratch/main> names A
|
|
```
|
|
|
|
```unison
|
|
unique type A = A ()
|
|
```
|
|
|
|
```ucm
|
|
scratch/main> update
|
|
scratch/main> names A
|
|
```
|
|
|
|
```unison
|
|
unique type A = A
|
|
```
|
|
|
|
Note that `A` is back to its original hash.
|
|
|
|
```ucm
|
|
scratch/main> update
|
|
scratch/main> names A
|
|
```
|