-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs typo - tried to fix and failed #28
Comments
Hi @drshade! Thank you so much for pointing this out! This is an artifact of Unison terms and functions being rendered in a more opinionated way than what might initially be expressed. The pretty printer will sometimes normalize a function in a way that is different from what we initially write. One thing I like to try to address this is to include the problematic function with the |
Thanks @rlmark ! I would love to take a crack at fixing it myself and will update here with findings. |
Awesome! Let me know if you have any questions! |
Hi @rlmark ! I tried to follow through the pull-request mechanism described, including some of the author / license requirements too and this is what I have come up with:
From a _asPatterns perspective I wasn't sure how to keep the function name the same for both snippets of (On the whole however I'm enjoying learning Unison and the process so I hope you can bear with me!) All the best, |
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:
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 theplaceSetting
functions instead of theslayHydra
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
The text was updated successfully, but these errors were encountered: