Proposal: Adding Kleisli composition to Control.Monad

John Meacham john at
Mon Nov 13 17:51:18 EST 2006

On Mon, Nov 13, 2006 at 01:29:44PM -0800, Ashley Yakeley wrote:
> Donald Bruce Stewart wrote:
> >    forever :: (Monad m) => m a -> m ()
> This should be:
>   forever :: (Monad m) => m a -> m b
> I agree with Conor both that this should really be in Applicative and 
> also that it may be more convenient to keep it in Monad for the time 
> being. If "Joined-Up Classes" 
> <> is approved, 
> 'forever' would then be one of the values to be generalised to Applicative.

if forever is made a part of applicative, it should be made part of the
class. It suffers from the same problem as the current broken many and
many1 in applicative, since they use implicit recursion, they are
useless for anything wanting to do anything but execute them in a
monadic framework. i.e., pretty much exactly the sort of things that
applicative was made to support (irony?) :)


John Meacham - ⑆⑆john⑈

More information about the Libraries mailing list