Proposal #2629: Data.List: Replace nub; add nubOrd, nubInt, nubWith

Alexander Dunlap alexander.dunlap at
Mon Sep 29 19:40:20 EDT 2008

On Mon, Sep 29, 2008 at 4:06 PM, Brandon S. Allbery KF8NH
<allbery at> wrote:
> On 2008 Sep 29, at 18:55, Alexander Dunlap wrote:
>> On Mon, Sep 29, 2008 at 9:40 AM, apfelmus <apfelmus at>
>> wrote:
>>> Alexander Dunlap wrote:
>>>> This seems like a good idea but it's kind of strange to have three
>>>> different exposed versions of nub. Would it be possible to hide them,
>>>> hide the StopList typeclass and use {-# RULES #-} pragmas to use the
>>>> faster versions when possible?
>>> I don't think that using RULES pragmas is a good solution to the problem.
>> Why not? I thought that was the major purpose of RULES - to implement
>> transformations that don't affect semantics. It seems silly to clutter
> So what of yhc, nhc98, jhc?  ghc is not the be-all and end-all of Haskell.

Well, yes, but presumably different compilers could optimize in
different ways. (Perhaps they could use some class behind the scenes,
or their own optimizing mechanism?) My point is that we shouldn't have
multiple exposed functions for _exactly_ the same semantic operation.


More information about the Libraries mailing list