Proposal: add fusion RULES for Data.Map.mapMaybe

Akio Takano tkn.akio at gmail.com
Wed Dec 4 10:33:31 UTC 2013


The proposal received support from two people, and got no objection, so I
created a ticket for it on the GHC trac.

https://ghc.haskell.org/trac/ghc/ticket/8595

Thank you,
Takano Akio

On Wed, Nov 20, 2013 at 4:40 PM, Akio Takano <tkn.akio at gmail.com> wrote:

> Hi,
>
> Currently mapMaybe does not fuse at all. The attached patch implements
> necessary rules for fold/build fusion in both sides (the result and the
> second argument) to happen. When fusion does not happen, the function
> should behave exactly the same as before.
>
> I ran some benchmarks, testing cases where fusion does and does not happen:
>
>
> http://htmlpreview.github.io/?https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/out.html
>
> The benchmark code is:
>
> https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/main.hs
>
> Discussion period: 2 weeks.
>
> Thank you,
> Takano Akio
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131204/09e1532c/attachment.html>


More information about the Libraries mailing list