unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

Forward declarations in terms are reordered by UCM #5425

Open rlmark opened 1 month ago

rlmark commented 1 month ago

Describe and demonstrate the bug

Reported by @etorreborre (thank you!!!), this is an issue where the UCM will re-order forward references even when they are nested inside other terms, leading to a new hash where one might not have been expected. The reordering can also affect the readability of a program.

A transcript is attached which reproduces this issue: forwardReference.md

Environment (please complete the following information):

Additional context For context, see Discord discussion here