-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add an example about phantom types #145
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
Comments
From #144 (comment): Reddit discussed this the other day. It is also mentioned in the old rust cheatsheet though Rust syntax looks a little different. The Haskell documentation for Phantom type is here. |
Examples will now build. Mostly just moved them around: mdinger@dd474e9 |
@mdinger Could you send a PR about this change? I can't really test this locally as it is, and that makes it hard for me to review. |
Done: #160 |
Fixed by #160 |
I tried to add an example about Phantom types at mdinger@b03fc84 which were discussed on the mozilla blog. It definitely doesn't work now because I tried embedding 2 separate live code examples in a single page.
The usefulness of Phantom types is not immediately obvious to me so I thought a better example should be included. However, using that
Add
there can be confusing and I don't know where all the pieces of it are explained.The first example became too complicated (long) when I added the second so I tried to split it. Any feedback is welcome. I cobbled it together using IRC for help.
I definitely don't know what you think about my list of cross references included but I tried to include references to the discussed topics anyway. No style was applied either.
The text was updated successfully, but these errors were encountered: