[GHC] #13593: Unexpected behavior from Data.List.groupBy
GHC
ghc-devs at haskell.org
Thu Apr 20 17:24:49 UTC 2017
#13593: Unexpected behavior from Data.List.groupBy
-------------------------------------+-------------------------------------
Reporter: dsf | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Documentation | Unknown/Multiple
bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dsf):
Replying to [comment:12 svenpanne]:
> Hmmm, does that mean that every single function under 'The "By"
operations' will get the sentence 'The predicate is assumed to define an
equivalence.' '/ The function is assumed to define a total ordering.'?
It's a little bit like repeating similar sentences for every function
taking an Eq/Ord context...
Definitely not - this is a recipe for teaching people to ignore stuff.
Elsewhere I said it makes sense to put it in the header, but consider that
the particularly unexpected results come from groupBy. In the other cases
you probablyu wouldn't consider using a non-transitive function argument:
{{{#!hs
-- What do these mean?
> nubBy notBoth1 [1,1,2,3,1,1,4,5,6,1]
[1,1,1,1,1]
> deleteBy notBoth1 3 [1,1,2,3,1,1,4,5,6,1]
[1,2,3,1,1,4,5,6,1]
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13593#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list