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

Alexander Dunlap alexander.dunlap at
Mon Sep 29 18:55:23 EDT 2008

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
up classes with extra functions just for efficiency or to have to
change programs every time the types change. The fact that RULES don't
work in GHCi is admittedly a downside; is there any plan to change


More information about the Libraries mailing list