Data.List.groupBy with non-transitive equality predicate

Henning Thielemann lemming at
Thu Aug 30 07:40:48 EDT 2007

On Wed, 29 Aug 2007, Thomas Schilling wrote:

> On 29 aug 2007, at 22.02, Henning Thielemann wrote:
> >  Since
> > the documentation doesn't tell which elements are actually compared it
> > seems to assume that the comparison is commutative and transitive.
> > Maybe
> > this point should be made clearer.
> I'd say this should be an implicit requirement for Eq a, just like
> Monad a assumes the monad laws (or strongly suggests).  But I agree
> that could be made clearer.

'groupBy' (not 'group') has no Eq constraint.

More information about the Libraries mailing list