Proposal: Adding Kleisli composition to Control.Monad

Samuel Bronson naesten at
Tue Nov 14 07:55:47 EST 2006

On 11/14/06, Taral <taralx at> wrote:
> On 11/13/06, Donald Bruce Stewart <dons at> wrote:
> > Do you mean that we should just import Control.Arrow and use that?
> Why not?

Well, it doesn't do the same thing, for starters...

<SamB_XP> @type runState (((\x -> return (x+1)) >>> (\y -> return (y*2))) 3) ()
<lambdabot> forall b (m :: * -> *). (Monad m, Num (m b), Num b) => (m b, ())

Does that look like Kleisli composition to you? It doesn't look like
Kleisli composition to me...

I think you are getting confused by the Arrow (->) instance, probably...

More information about the Libraries mailing list