add fusion RULES for mapMaybe
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.
This proposal has gone through a discussion in the libraries mailing list:
http://www.haskell.org/pipermail/libraries/2013-November/021640.html
[Note that the subject of the e-mail thread is wrong, it should mention "Data.Maybe.mapMaybe", not "Data.Map.mapMaybe"]
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries/base |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |