FW: RE [Haskell-cafe] Monad Description For Imperative Programmer

Dan Piponi dpiponi at gmail.com
Wed Aug 1 16:57:56 EDT 2007

On 8/1/07, Dan Weston <westondan at imageworks.com> wrote:
> The moral of the story is that monads are less than meets the eye. You
> can create them and concatenate them

I mostly sympathise with your rant, but I think you need to be clearer
about what exactly is concatenated. In general you can't concatenate
Monads. What you *can* concatenate are Kleisli arrows (ie. things of
type Monad m => a -> m b). You can also apply Kleisli arrows to
Monads, and that's what >>= does.

I feel that talking about Monads without Kleisli arrows is like
talking about category theory without arrows, or at least sets without
functions. In each case, without the latter, the former is more or
less useless.

Also, I'm having a terminological difficulty that maybe someone can help with:

'Monad' is a type class.

So what's 'IO'? Is the correct terminology 'instance' as in 'IO is an
instance of Monad'. I consider 'IO' to be 'a monad' as that fits with
mathematical terminology. But what about an actual object of type 'IO
Int', say? Some people have been loosely calling such an object 'a
monad'. That doesn't seem quite right. Maybe it's 'an instance of IO
Int', though that's stretching the word 'instance' to meaning two
different things. And if an object of type IO Int is in instance of IO
Int, is it reasonable to also call it an 'instance of IO', or even 'an
instance of Monad'? I'm sure there are proper words for all these
things if someone fills me in.

More information about the Haskell-Cafe mailing list