-
-
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
Add documentation for Show
#1789
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1789 +/- ##
==========================================
+ Coverage 94.87% 94.97% +0.09%
==========================================
Files 241 241
Lines 4139 4199 +60
Branches 103 108 +5
==========================================
+ Hits 3927 3988 +61
+ Misses 212 211 -1
Continue to review full report at Codecov.
|
``` | ||
|
||
This still may not seem useful to you, because case classes already automatically implement `toString`, while `show` would have to be implemented manually for each case class. | ||
Thankfully with the help of a small library called [kittens](https://github.com/milessabin/kittens) a lot of type class instances including `Show` can be derived automatically! |
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.
So I guess your PR to add show
to kittens is almost ready? BTW, in case you haven't seen this, miles wrote a shapeless example deriving a Show
https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/shows.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.
Oh wow, I didn't know about LabelledTypeClass, thank you so much! :)
kittens 1.0.0-RC0 is released with |
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.
Nice!
👍 |
This is still WIP as,
kittens
doesn't currently supportShow
(I hope to create PR soonish, https://github.com/milessabin/kittens/issues/40) @kailuowang also expressed interest :)