[Haskell-cafe] Re: do

Dan Piponi dpiponi at gmail.com
Mon Dec 3 19:19:48 EST 2007

On Dec 3, 2007 3:54 PM, Ben Franksen <ben.franksen at online.de> wrote:

> I don't buy this. As has been noted by others before, IO is a very special
> case, in that it can't be defined in Haskell itself, and there is no
> evaluation function runIO :: IO a -> a.

I'm not sure what a function of type m a -> a has to do with the
concept of a monad. And I don't really see what the problem is with
the IO monad not being definable in (pure) Haskell. IO exposes the
same interface as every other Monad, and you need to use that
interface to get visible results. So people have to learn it whatever.
And the whole point of the Monad is that it's an interface, not a
specific implementation.

> I'd rather use a simple example like Maybe (modeling failure as an effect).

And I'd like to see more people getting off the ground doing
interesting stuff with Haskell before their attention spans for
pointless-seeming new stuff run out. I'm not talking about the
smartest people in computer science courses here. I'm talking about
the millions of people writing everyday Python and Ruby scripts, say,
who might benefit from a more expressive, type-safe, well-thought out,
fast and compiled language.

More information about the Haskell-Cafe mailing list