#5473: sortBy is no longer a good consumer in GHC 7
---------------------------------+------------------------------------------
    Reporter:  lpsmith           |       Owner:                   
        Type:  bug               |      Status:  new              
    Priority:  normal            |   Component:  Compiler         
     Version:  7.2.1             |    Keywords:                   
    Testcase:                    |   Blockedby:                   
          Os:  Unknown/Multiple  |    Blocking:                   
Architecture:  Unknown/Multiple  |     Failure:  Documentation bug
---------------------------------+------------------------------------------
 The [http://www.haskell.org/ghc/docs/7.2.1/html/users_guide/rewrite-
 rules.html#id717388 List Fusion section of the GHC User's Guide] lists
 {{{sortBy}}} as a good consumer.

 In past versions of GHC,  {{{sortBy}}} turned its input into a list of
 lists to be merged by using {{{map (:[])}}}, which is why it was a good
 consumer.   However this is somewhat arguable,  as it's only a good
 consumer in a weak sense of the word.  When it comes to doing the real
 work of the algorithm,  sort was never a good consumer.

 However,  in GHC 7,  {{{sortBy}}} breaks its input into monotonic runs,
 producing a shorter outer list.  This is not a good consumer in any sense
 of the word.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5473>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to