[Haskell-cafe] Can it be proven there are no intermediate "useful" type classes between Applicative Functors & Monads?

David Barbour dmbarbour at gmail.com
Tue Jun 7 18:14:32 CEST 2011


On Sun, Jun 5, 2011 at 12:51 PM, KC <kc1956 at gmail.com> wrote:

> If new intermediate classes crop up then there would be no point in fixing
>
> class (Applicative m) => Monad m where
>
> since it would have to be changed if new intermediate classes are found.
>

You might check out a few articles regarding Kleisli arrows [1][2] for
possibilities that live between applicative and monad.

Applicative itself is also a little on the strong side. I had to reject
Applicative for one model of signal transformers because 'pure' was not a
legal constructor, even though 'fmap . const' and '<*>' were okay. And even
Functor is too strong if you want effective linearity. I've found Adam
Megacz's Generalized Arrows [3] to be a suitable chassis for weaker models.

[1] http://www.haskell.org/haskellwiki/Arrow_tutorial#Kleisli_Arrows
[2] http://lambda-the-ultimate.org/node/4273
[3] http://www.cs.berkeley.edu/~megacz/garrows/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110607/8bdf32fe/attachment.htm>


More information about the Haskell-Cafe mailing list