Description
Hello Unison Team!
I was trying to fix a typo I found while going through the "learn/fundamentals/control-flow/pattern-matching2" examples - specifically the slayHydra functions under the as-patterns section. Opening the website above you can see the docs are not correct, and the second slayHydra does not use the "@" symbol. So I thought I would try to fix it myself - and managed to pull and fork the docs:
$ ucm --codebase-create codebase
[Snip]
.> pull https://github.com/unisonweb/website:.learn ._learn
[Snip]
.> cd _learn.fundamentals.controlFlow
._learn.fundamentals.controlFlow> display _asPatterns
[Shows the bug! slayHydra is incorrect in the second form]
._learn.fundamentals.controlFlow> edit _asPatterns
[Shows slayHydra is correct in the second form...]
So that seems odd to me - I thought maybe initially it as Unison being clever and maybe both functions are identical so they effectively hash to the same content, so I tried to modify the second example more invasively by adding an extra function parameter to slayHydra - but to no avail. It does not seem to update (e.g. view _asPatterns
vs. display _asPatterns
).
Even more weird is when I go display patternMatching2
the code examples under the "As-patterns" actually show the placeSetting
functions instead of the slayHydra
functions!! So now I'm convinced there is a bug somewhere - but will need some guidance around this as it seems quite core and probably out of my weight class for now!
All the best,
Tom