unison/unison-src/transcripts/unique-type-churn.md
2024-06-25 11:11:07 -07:00

705 B

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.

unique type A = A

unique type B = B C
unique type C = C B
scratch/main> add
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.

scratch/main> names A
unique type A = A ()
scratch/main> update
scratch/main> names A
unique type A = A

Note that A is back to its original hash.

scratch/main> update
scratch/main> names A