Created
August 9, 2014 18:59
-
-
Save paulp/775717c91d19506e340a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> class Bippy | |
defined class Bippy | |
scala> val x = new Bippy | |
x: Bippy = Bippy@4919b727 | |
scala> show"$x" | |
<console>:15: error: type mismatch; | |
found : Bippy | |
required: psp.std.Shown[_] | |
show"$x" | |
^ | |
scala> implicit val BippyShow = Show[Bippy](_ => "I'm Bippy!") | |
BippyShow: psp.std.Show[Bippy] = psp.std.Show$$anon$1@78146d52 | |
scala> show"$x" | |
res1: String = I'm Bippy! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment