unison/unison-src/transcripts/fix987.md
2024-06-25 11:11:07 -07:00

645 B

scratch/main> builtins.merge

First we'll add a definition:

structural ability DeathStar where
  attack : Text -> ()

spaceAttack1 x =
  y = attack "saturn"
  z = attack "neptune"
  "All done"

Add it to the codebase:

scratch/main> add

Now we'll try to add a different definition that runs the actions in a different order. This should work fine:

spaceAttack2 x =
  z = attack "neptune"
  y = attack "saturn"
  "All done"
scratch/main> add

Previously, this would fail because the hashing algorithm was being given one big let rec block whose binding order was normalized.