I often find a neat solution to a problem by using Scalaz pimps. Usually the solution works like
import scalaz._
import Scalaz._
foobar frobnicate quux
// magic
Now, I would like to be able to see what implicits I have actually used to add to my Foobar
a frobnicate method. In this way I can make a more refined import and learn something new about the tool I have implicitly used.
Is there some way to find out what implicit conversions the compiler actually used to compile some expression?
You can also see the fully expanded version of your code using the -Xprint:typer
option to scalac. In a sbt project, one can add the line
scalacOptions += "-Xprint:typer"
to build.sbt
and see the result with the compile
commmand.
(taken from the answer linked by retronym)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With