[GHC] #8595: add fusion RULES for mapMaybe

#8595: add fusion RULES for mapMaybe ------------------------------------+------------------------------------- Reporter: akio | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- 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"] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8595 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8595: add fusion RULES for mapMaybe -------------------------------------+------------------------------------ Reporter: akio | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by akio): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8595#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8595: add fusion RULES for mapMaybe -------------------------------------+------------------------------------ Reporter: akio | Owner: nomeata Type: feature request | Status: patch Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by nomeata): * owner: => nomeata Comment: I’ll validate and push this later today. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8595#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8595: add fusion RULES for mapMaybe -------------------------------------+------------------------------------ Reporter: akio | Owner: nomeata Type: feature request | Status: closed Priority: normal | Milestone: Component: libraries/base | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by nomeata): * status: patch => closed * resolution: => fixed Comment: Thx, pushed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8595#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC