[Haskell-cafe] Just 3 >>= (1+)?

Miguel Mitrofanov miguelimo38 at yandex.ru
Sat May 9 18:03:39 EDT 2009


On 10 May 2009, at 00:30, Brandon S. Allbery KF8NH wrote:

> On May 9, 2009, at 15:31 , michael rice wrote:
>> Prelude> Just 3 >>= (1+)
>
> That (a -> m b) in the middle is what's failing to typecheck.  The  
> error is a bit obtuse because ghci is trying hard to find a way to  
> do what you want, so it assumes "m" is "(-> r)" (the functor/monad  
> representing functions, also known as the Reader monad)

Ehm? What? I haven't seen the (-> r) monad anywhere near this code.


More information about the Haskell-Cafe mailing list