Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

wonk1132
Copy link

@wonk1132 wonk1132 commented Oct 11, 2016

Small change to semigroup.md for clarity. This wording basically matches that of semigroupK.md now.

@codecov-io
Copy link

codecov-io commented Oct 12, 2016

Current coverage is 92.19% (diff: 100%)

Merging #1404 into master will not change coverage

@@             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          

Powered by Codecov. Last update 25e9628...89dc3bf

@wonk1132 wonk1132 changed the title small wording change for clarity small wording change to semigroup.md for clarity Oct 12, 2016
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`.
Copy link
Contributor

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?

Copy link
Author

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.

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch 2 times, most recently from a8e4093 to 4f85c97 Compare October 15, 2016 20:10
instance defined for `None` or `Some`--you will get errors if you attempt to combine a
`Some` or `None` instance:

```tut:scala
Copy link
Collaborator

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok. fixed.

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch from 4f85c97 to 848ba63 Compare October 19, 2016 17:01
@peterneyens
Copy link
Collaborator

You can drop the > from the tut sections, and you could probably use tut:book:fail for the one which doesn't compile with Some and None.

For more info see the tut project.

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch from 3cc712c to 084501f Compare October 19, 2016 21:45
@wonk1132
Copy link
Author

ah! got it, thanks for the info. fixed.

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch 2 times, most recently from 51201cd to 9dc7cdc Compare October 20, 2016 16:30
@wonk1132
Copy link
Author

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

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch from 9dc7cdc to 93346c8 Compare October 21, 2016 22:07
@peterneyens
Copy link
Collaborator

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).

@non
Copy link
Contributor

non commented Oct 25, 2016

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?

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch from 93346c8 to 30faa21 Compare October 26, 2016 21:51
@wonk1132
Copy link
Author

oops, yea, messed that up.

moved to /typeclasses

@wonk1132 wonk1132 force-pushed the semigroupDocWording branch from 30faa21 to 89dc3bf Compare October 27, 2016 00:02
@adelbertc
Copy link
Contributor

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 Semigroup and Monoid and would appreciate it your feedback on it: #1442

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 Semigroup or in a more general place like the FAQ since these gotchas aren't Semigroup-specific. What do you think?

@wonk1132
Copy link
Author

wonk1132 commented Oct 28, 2016

@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?

@adelbertc
Copy link
Contributor

@wonk1132 Hm I'm now thinking if we should have a separate page for "gotchas" in type classes - stuff like type inference, Unapply/SI-2712 come to mind, perhaps put in FAQ.

Would you mind adding this as a question under FAQ?

@adelbertc adelbertc mentioned this pull request Oct 30, 2016
@kailuowang
Copy link
Contributor

@wonk1132 Thanks for your contribution. I am going to close this one as #1442 (in lieu of this) was merged.

@kailuowang kailuowang closed this Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants