[Haskell-cafe] Name that function =)

Louis J Scoras louis.j.scoras at gmail.com
Tue Dec 12 13:14:14 EST 2006


On 12/12/06, Brandon S. Allbery KF8NH <allbery at ece.cmu.edu> wrote:

> Read the thread more completely; ((->) a) is indeed a monad, but you
> need to include an additional module to get the definition.

Ahh, okay I did see that.  I thought that importing Control.Monad
would be sufficient.

What I didn't realize is that even though the documentation for
Control.Monad says that (->(r)) is an instance, it must not be defined
there.  Importing Control.Monad.Reader indeed does make it work,
thanks for pointing that out again.

So I guess my next question would be, looking here

    http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html

How do I figure out that the instance declaration is actually in the
Reader module?  Is it just because the (->) constructor is special --
or just not hyperlinked?


-- 
Lou.


More information about the Haskell-Cafe mailing list