[trac@galois.com: Re: [GHC] #1218: Add sortNub and sortNubBy to Data.List]

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Mar 21 20:58:18 EDT 2007


On Wed, 2007-03-21 at 23:41 +0000, Lennart Augustsson wrote:
> Of course it means that a function must have exactly the same  
> strictness. If it doesn't have the same strictness it's not the same
> function.

Of course.

> I agree the report should be fixed where the functions in the report do
> not have the appropriate strictness.  But this is a change to the  
> report.

It's interesting to note that the implementations in base for some
functions in Data.List have been inconsistent with the report for years
and nobody has noticed (or at least if they noticed they didn't complain
very loudly).

For example the standard implementations of partition and splitAt have
been inconsistent with the H98 spec forever. I say forever since the
implementations were consistent with the Haskell 1.2, 1.3 and 1.4
specifications but the Haskell98 report changed the specification and
the implementations were never updated.

Similarly, GHC has had an incorrect implementation of genericTake for
some years and no-one has noticed. The current implementation is
inconsistent with Haskell98 and looking back, GHC 3.02 was inconsistent
with Haskell 1.4 which as far as I can tell was the first version of the
spec to define genericTake.

Duncan



More information about the Libraries mailing list