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

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Mon Sep 29 19:53:14 EDT 2008


On 2008 Sep 29, at 19:40, Alexander Dunlap wrote:
> On Mon, Sep 29, 2008 at 4:06 PM, Brandon S. Allbery KF8NH
> <allbery at ece.cmu.edu> wrote:
>> On 2008 Sep 29, at 18:55, Alexander Dunlap wrote:
>>> On Mon, Sep 29, 2008 at 9:40 AM, apfelmus  
>>> <apfelmus at quantentunnel.de>
>>> 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.

Tell it to the Prelude.  (^), (^^), (**) anyone?

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Libraries mailing list