[GHC] #9538: unwords does not participate in list fusion

#9538: unwords does not participate in list fusion -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- I'm not quite sure how far this can go, but `unwords` should almost certainly be a good consumer or a good consumer. Currently it is neither. Making it a good consumer is trivial, given `concatMap` that fuses: {{{#!hs unwords = tail . concatMap (' ':) }}} Alternatively, we should be able to make it a good producer without too much trouble, I think. I have my doubts about making it both. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9538 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9538: unwords does not participate in list fusion -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: invalid | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by dfeuer): * status: new => closed * resolution: => invalid Comment: Needs more thinking. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9538#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9538: unwords does not participate in list fusion -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: invalid | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by slyfox: Old description:
I'm not quite sure how far this can go, but `unwords` should almost certainly be a good consumer or a good consumer. Currently it is neither. Making it a good consumer is trivial, given `concatMap` that fuses:
{{{#!hs unwords = tail . concatMap (' ':) }}}
Alternatively, we should be able to make it a good producer without too much trouble, I think. I have my doubts about making it both.
New description: I'm not quite sure how far this can go, but `unwords` should almost certainly be a good consumer or a good producer. Currently it is neither. Making it a good consumer is trivial, given `concatMap` that fuses: {{{#!hs unwords = tail . concatMap (' ':) }}} Alternatively, we should be able to make it a good producer without too much trouble, I think. I have my doubts about making it both. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9538#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC