Is there a way to search for instances of a typeclass on Hoogle (or Stackage)?
For instance, I want to know which package defines an instance of Lift
for Text
.
I was able to find it in the package th-lift-instances
, but it took about 10 minutes of manual searching. It seems like there should be some functionality of Hoogle that allows searching for instances.
For now, no. However, a feature was recently added to haddock to allow instances to link to their source, and all new documentation built on Hackage has that turned on. So in the next release of the th-lift
package, you should see a "Source" link next to the Lift Text
instance that will tell you what you need to know.
Expanding on Kolmar's comment, some Google techniques do go a long way towards finding instances.
Examples:
-inurl:
is used to clean up superfluous results from where the typeclass was defined.
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