- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: [ANN] Scalaz 6.0 || scaladoc
Wed, 2011-06-08, 17:32
On Wed, Jun 8, 2011 at 6:02 PM, Martin S. Weber wrote:
> You mean you grep for each way a Monoid could come to life? Looking at the
> sources of, say, Monoid itself doesn't tell me anything about its
> implementations. And, some portalfs aside, I can't grep the online sources
> either (yes yes I know I can download it, I just don't understand the value
> of the hyperlinked sources online for this kind of problem -- please
> enlighten me).
Type class instances M[T] are usually defined in the companion object
of M or T. Look at the sources/scaladoc for these in the first
instance. You need to know a bit about the structure of Scalaz to know
to look in Semigroup/Zero; but once you know the pattern you can apply
it to other type classes.
Another tool is the REPL, run implicitly[Monoid[String]] to check if
something is defined.
-jason