Add flipped fmap

Edward Kmett ekmett at gmail.com
Thu Apr 8 16:15:55 EDT 2010


I'd strongly discourage removing <$> from Control.Applicative, as it has
been there since the start and basically every single client of
Control.Applicative would break and have to add a second import.

The idiom of foo <$> bar <*> baz <*> ... is the whole point of using an
Applicative after all!

I laud the goal of everything having exactly one place to be, but here I
think practical considerations override.

-Edward Kmett

On Thu, Apr 8, 2010 at 4:07 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:

> On Thu, Apr 8, 2010 at 9:38 PM, Isaac Dupree
> > This parallelism also suggests to me that <$$> should be placed (only) in
> > Control.Applicative, which is where <*>, <$>, and <**> reside.  Yeah, I
> know
> > that's annoying...
>
> That's indeed annoying.
>
> What about removing <$> and <$ from Control.Applicative?
>
> One advantage is that this reduces the complexity tax of
> Control.Applicative.
>
> One disadvantage is that this will surely break some code. Especially
> because, for some weird reason, Data.Functor is not know to hoogle.
>
> http://haskell.org/hoogle/?q=Data.Functor
>
> And <$> is reported to be only exported by Control.Applicative
>
> http://haskell.org/hoogle/?hoogle=%3C%24%3E
>
> sigh...
>
> Let's save this for a new proposal however...
>
> Bas
>
> P.S.
> Jonathan, thanks for the equational law relating <$$> and <**>:
> a <$$> f = a <**> return f
> this has strongly put me back in the +1 camp :-)
> _______________________________________________
> 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/20100408/48be9b25/attachment-0001.html


More information about the Libraries mailing list