2023-07-18 20:45:02 +03:00
|
|
|
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
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2023-07-18 20:45:02 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
|
|
|
unique type A = A
|
|
|
|
|
|
|
|
unique type B = B C
|
|
|
|
unique type C = C B
|
|
|
|
```
|
2023-11-29 23:29:32 +03:00
|
|
|
|
|
|
|
If the name stays the same, the churn is even prevented if the type is updated and then reverted to the original form.
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> names A
|
2023-11-29 23:29:32 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
|
|
|
unique type A = A ()
|
|
|
|
```
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> update
|
|
|
|
scratch/main> names A
|
2023-11-29 23:29:32 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
```unison
|
|
|
|
unique type A = A
|
|
|
|
```
|
|
|
|
|
|
|
|
Note that `A` is back to its original hash.
|
|
|
|
|
|
|
|
```ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> update
|
|
|
|
scratch/main> names A
|
2023-11-29 23:29:32 +03:00
|
|
|
```
|