[Haskell-beginners] Re: monad nomad gonad gomad

Ertugrul Soeylemez es at ertes.de
Sun Aug 15 10:43:09 EDT 2010

prad <prad at towardsfreedom.com> wrote:

> in any case, monads seem to be a rather important concept to getting
> anything done in haskell. for instance, i have a program which is
> generating the output it is supposed to (i can print it), but i can't
> seem to get it into another function and keep getting the error i've
> seen so many times:
> Couldn't match expected type `[String]'
>     against inferred type `IO [String]'
> so it's time to understand them.

In an earlier thread titled "= vs <-" you asked for the difference
between equations (=) and monadic binding (<-).  Since you didn't
respond, I'm not sure whether you are reading our posts, but we have
explained in detail the difference.  Once understood, you won't get
errors like that anymore.

As a well meant suggestion, you have to actually read the answers to
your posts, even if they are long.  Posting essentially the same
questions over and over gets you nowhere.

> besides, the stuff looks rather intriguing and certainly appears to
> take one into computer language design theory.

Not really.  A monad is just a way to combine computations.  You're
still thinking way too complicated.

> any sources others have found useful would be appreciated as well as
> suggestions on how to proceed through the above.

Well, I have the impression that writing monad tutorials is very hateful
in the Haskell community, independent of the tutorial's actual quality.
That's why I don't like to mention my own one, even though so far I have
only received very positive feedback (thanks to all, who have bothered
to write me).

I think that new tutorials aren't even reviewed by experienced Haskell
users anymore, especially since Brent Yorgey wrote his famous blog entry
[1].  I agree with Brent, but his post had a negative side effect, too.
New tutorials seem to be marked as spam by reflex now by most people.
Personally I find this very unfortunate, and I'm not sure whether that
was Brent's intention.

[1] http://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/


nightmare = unsafePerformIO (getWrongWife >>= sex)

More information about the Beginners mailing list