
#9344: takeWhile does not participate in list fusion -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.8.3 libraries/base | Keywords: Resolution: | Operating System: Unknown/Multiple Differential Revisions: | Type of failure: Runtime Architecture: | performance bug Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -------------------------------------+------------------------------------- Comment (by nomeata): I have some idea to make the translate/untranslate dance generic (and thus reliably usable by people wanting list fusion for their own functions) but I’ll ponder it some more. Can you explain why it fails in complex cases? And how does it perform? Is a fused `takeWhile (<10) [1..10000000]` slower than a non-fused? What happens with `takeWhile (<10) (cycle [1,100])` (if `cycle` fuses at all). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9344#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler