unison/unison-src/transcripts/fix987.md
Paul Chiusano b7bf12081b
Add Author and License metadata types to builtins (#1228)
* Fix #1056 and add author and license metadata types

* Transcript demonstrating that the codebase is empty at first
2020-02-13 10:59:53 -05:00

601 B

.> builtins.merge

First we'll add a definition:

ability DeathStar where
  attack : Text -> ()

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

Add it to the codebase:

.> 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"
.> add

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