Add flipped fmap

Edward Kmett ekmett at gmail.com
Wed Apr 7 09:09:50 EDT 2010


What about if you add grep 'flip fmap' ?

-Edward Kmett

On Wed, Apr 7, 2010 at 8:34 AM, Jesper Louis Andersen <
jesper.louis.andersen at gmail.com> wrote:

> On Wed, Apr 7, 2010 at 11:13 AM, Bas van Dijk <v.dijk.bas at gmail.com>
> wrote:
>
> > I would like to propose adding a flipped variant of <$> to Data.Functor:
> >
> > (<$$>) ∷ Functor f ⇒ f α → (α → β) → f β
> > (<$$>) = flip (<$>)
> >
>
> It is worth doing some simple statistics: There are 5939 hackage
> packages in my git-repo archive. Of these, there are 10 apps which
> import Data.Functor directly. The number for Control.Applicative is
> 418. 'flip\s*<$>' is defined by 6 different packages:
>
> jlouis at jlouis-desktop:~/Projects/hackage$ git grep 'flip\s\+<\$>' |
> sed -e 's/:.*$//'
> HXQ-0.18.2.tar.gz.dir/HXQ-0.18.2/src/hxml-0.2/LLParsing.hs
> HXQ-0.18.2.tar.gz.dir/HXQ-0.18.2/src/hxml-0.2/LLParsing.hs
>
> action-permutations-0.0.0.0.tar.gz.dir/action-permutations-0.0.0.0/Control/Applicative/Permutation.hs
>
> curry-frontend-0.2.9.tar.gz.dir/curry-frontend-0.2.9/src/Curry/Syntax/LLParseComb.lhs
>
> curry-frontend-0.2.9.tar.gz.dir/curry-frontend-0.2.9/src/Curry/Syntax/LLParseComb.lhs
> ideas-0.5.8.tar.gz.dir/ideas-0.5.8/src/Text/Parsing.hs
>
> uu-parsinglib-2.3.1.tar.gz.dir/uu-parsinglib-2.3.1/src/Text/ParserCombinators/UU/Derived.hs
>
> uu-parsinglib-2.3.1.tar.gz.dir/uu-parsinglib-2.3.1/src/Text/ParserCombinators/UU/Derived.hs
>
> uu-parsinglib-2.3.1.tar.gz.dir/uu-parsinglib-2.3.1/src/Text/ParserCombinators/UU/Derived.hs
>
> uu-parsinglib-2.3.1.tar.gz.dir/uu-parsinglib-2.3.1/src/Text/ParserCombinators/UU/Derived.hs
> uulib-0.9.12.tar.gz.dir/uulib-0.9.12/src/UU/Parsing/Derived.hs
> uulib-0.9.12.tar.gz.dir/uulib-0.9.12/src/UU/Parsing/Derived.hs
> uulib-0.9.12.tar.gz.dir/uulib-0.9.12/src/UU/Parsing/Derived.hs
> uulib-0.9.12.tar.gz.dir/uulib-0.9.12/src/UU/Parsing/Derived.hs
>
> The confounder is: How many packages would have used the flipped
> variant had they had access to it. Personally, I wouldn't add it, but
> it cannot hurt since only 10 hackage packages would potentially be
> affected by the change. For non-hackage packages, if the hackage
> packages are taken as a sample, we have 0.1% of the packages affected
> (fewer, actually).
>
> --
> J.
> _______________________________________________
> 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/20100407/66de4aa8/attachment-0001.html


More information about the Libraries mailing list