mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-23 16:28:02 +03:00
34 lines
566 B
Markdown
34 lines
566 B
Markdown
|
|
||
|
First we'll add a definition:
|
||
|
|
||
|
```unison
|
||
|
ability DeathStar where
|
||
|
attack : Text -> ()
|
||
|
|
||
|
spaceAttack1 x =
|
||
|
y = attack "saturn"
|
||
|
z = attack "neptune"
|
||
|
"All done"
|
||
|
```
|
||
|
|
||
|
Add it to the codebase:
|
||
|
|
||
|
```ucm
|
||
|
.> add
|
||
|
```
|
||
|
|
||
|
Now we'll try to add a different definition that runs the actions in a different order. This should work fine:
|
||
|
|
||
|
```unison
|
||
|
spaceAttack2 x =
|
||
|
z = attack "neptune"
|
||
|
y = attack "saturn"
|
||
|
"All done"
|
||
|
```
|
||
|
|
||
|
```ucm
|
||
|
.> add
|
||
|
```
|
||
|
|
||
|
Previously, this would fail because the hashing algorithm was being given one big let rec block whose binding order was normalized.
|