[Haskell-cafe] Why Kleisli composition is not in the Monad signature?

Jake McArthur jake.mcarthur at gmail.com
Tue Oct 16 15:51:29 CEST 2012

On Mon, Oct 15, 2012 at 11:29 PM, Dan Doel <dan.doel at gmail.com> wrote:
> I'm uncertain where this, "compositional means written as the
> composition of functions," thing started. But it is not what I, and
> I'm sure any others mean by the term, "compositional."

You're right. It's a rather recent, as far as I can tell, overloading
of the word that I inadvertently picked up. The meaning of this
overloading, at least as I understand and intended it, is that it
forms a category. I will try to avoid this use of the word in the

> For three, I can't for the life of me think of how anyone would write
> (>=>) as a primitive operation _except_ for writing (>>=) and then '(f
>>=> g) x = f x >>= g'. The function cannot be inspected to get the
> result except by applying it.

This is a good point.

> I'd be down with putting join in the class, but that tends to not be
> terribly important for most cases, either.

Join is not the most important, but I do think it's often easier to
define than bind. I often find myself implementing bind by explicitly
using join.

- Jake

More information about the Haskell-Cafe mailing list