-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
small wording change to semigroup.md for clarity #1404
Conversation
Current coverage is 92.19% (diff: 100%)@@ master #1404 diff @@
==========================================
Files 242 242
Lines 3615 3615
Methods 3546 3546
Messages 0 0
Branches 69 69
==========================================
Hits 3333 3333
Misses 282 282
Partials 0 0
|
Option. If we try to use Some and None, we'll get errors: | ||
`Option(1)`, and I added an explicit type declaration for `n`. This is because | ||
the type class instance is defined for `Option`. There is no type class | ||
defined for `None` or `Some`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean There is no instances defined for
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right. my bad. I also further clarified and expanded this point.
a8e4093
to
4f85c97
Compare
instance defined for `None` or `Some`--you will get errors if you attempt to combine a | ||
`Some` or `None` instance: | ||
|
||
```tut:scala |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be tut:book
. Changing this and the same below, should make the build pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok. fixed.
4f85c97
to
848ba63
Compare
You can drop the For more info see the tut project. |
3cc712c
to
084501f
Compare
ah! got it, thanks for the info. fixed. |
51201cd
to
9dc7cdc
Compare
Thanks for your help @peterneyens. I'm not familiar with the approval process in this repo. Do doc changes require two +1's? is there anything else I need to do? thx again |
9dc7cdc
to
93346c8
Compare
It seems like this PR currently re-adds the file docs/src/main/tut/semigroup.md (which was moved to the typeclasses directory in #1369). |
These changes seem great! I agree with @peterneyens -- it seems like a file got accidentally re-added. @wonk1132, do you think you can fix this? |
93346c8
to
30faa21
Compare
oops, yea, messed that up. moved to /typeclasses |
30faa21
to
89dc3bf
Compare
Hey @wonk1132 , thanks for your PR! I recently took it upon myself to go around the Cats docs and start revamping them a bit. I just did it for I tried to incorporate your changes into the new version but also began wondering if these type inference gotchas belong in a specific type class tutorial like |
@adelbertc I think a general blurb in typeclasses.md about this typeclass implementation gotcha and adding a link to that in the FAQ would good. I think that info should be linked to in the specific typeclass document itself as most folks will probably go straight to the .md they want to use without reading the general typeclass.md doc itself. Should I just close this PR since #1442 overtakes it? |
@wonk1132 Hm I'm now thinking if we should have a separate page for "gotchas" in type classes - stuff like type inference, Would you mind adding this as a question under FAQ? |
Small change to semigroup.md for clarity. This wording basically matches that of
semigroupK.md
now.