[GHC] #9538: unwords does not participate in list fusion
GHC
ghc-devs at haskell.org
Mon Sep 1 23:10:01 UTC 2014
#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
More information about the ghc-tickets
mailing list