Proposal: Adding Kleisli composition to Control.Monad

Taral taralx at gmail.com
Tue Nov 14 02:31:07 EST 2006


On 11/13/06, Ashley Yakeley <ashley at semantic.org> wrote:
> Yes, the Kleisli type "Kleisli a b = a -> m b" is an Arrow. No, it's not
>   the same, since "a -> m b" is not an Arrow on a and b (it's not of the
> form "arrow a b").

Apparently the type is transparent, though...

Prelude Control.Arrow Control.Monad> :t (return 4) >>> flip replicateM
(return ())
(return 4) >>> flip replicateM (return ()) :: (Monad m) => b -> m [()]

-- 
Taral <taralx at gmail.com>
"You can't prove anything."
    -- Gödel's Incompetence Theorem


More information about the Libraries mailing list