Applicative functor composition

Edward Kmett ekmett at gmail.com
Wed Jun 17 23:25:37 EDT 2009


The problem is that is more than one way to compose two applicative
functors! If one is a pointed functor and the other is a monad, then there
are at least 3 different forms of distributive laws that might be used to
compose them to obtain a monad (and as a side effect, obtain an applicative)
in addition to the closure of applicative functors under composition.
I would strongly advise against enshrining applicative/applicative
composition directly in Control.Applicative. If you want to place it in
something off to the side like Control.Applicative.Composition, then by all
means.
-Edward Kmett.

On Wed, Jun 17, 2009 at 5:33 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> In the TypeCompose package there is the O data type for composing two
> applicative functors
>
> http://hackage.haskell.org/packages/archive/TypeCompose/0.6.4/doc/html/Control-Compose.html
>
> However I hesitate to import this package because of a lot of needed type
> extensions. But since 'O' seems to be the canonical way for combining two
> functors, could we add it to Control.Applicative?
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20090617/c9231918/attachment.html


More information about the Libraries mailing list