This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: [ANN] Scalaz 6.0 || scaladoc

No replies
Jason Zaugg
Joined: 2009-05-18,
User offline. Last seen 38 weeks 5 days ago.

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

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland