Proposal: add fusion RULES for Data.Map.mapMaybe

Joachim Breitner mail at
Thu Nov 21 19:30:27 UTC 2013


Am Mittwoch, den 20.11.2013, 16:40 +0900 schrieb Akio Takano:
> 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.

+1. Also, the code seems to be correct (at least quickcheck tells me

Thanks for the contribution,

Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  Jabber: nomeata at  • GPG-Key: 0x4743206C
  Debian Developer: nomeata at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Libraries mailing list