sortBy is no longer a good consumer in GHC 7
The 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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |