[GHC] #2717: Add nubWith, nubOrd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[GHC] #2717: Add nubWith, nubOrd

GHC-2
#2717: Add nubWith, nubOrd
---------------------------------+------------------------------------------
    Reporter:  Bart Massey       |       Owner:                  
        Type:  proposal          |      Status:  new            
    Priority:  normal            |   Component:  libraries/base  
     Version:                    |    Severity:  normal          
    Keywords:                    |    Testcase:                  
Architecture:  Unknown/Multiple  |          Os:  Unknown/Multiple
---------------------------------+------------------------------------------
 This is a followup to my proposal #2629, which had a much more ambitious
 scheme.  After much discussion, it was decided to put this smaller
 proposal on the table.

 I've implemented a new function Data.List.nubWith that takes a "stop list"
 and "filtering function" as an argument, and filters its target list
 against the stop list. I've then implemented Data.Set.nubOrd in terms of
 nubWith. nubBy is left alone, since there's nothing obvious to be done
 about it. All of the nubs are still fully lazy.

 Basic QuickCheck tests have been written, and pass.
 Performance benchmarking shows my nubOrd implementation to be quite
 comparable to that of nub in cases where the latter performs well, and
 dramatically faster when nub performs poorly. In particular, nubOrd can
 work on long lists with long nubs, unlike the basic nub, which is
 hopeless.

 Patch against current Darcs head attached.

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2717>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #2717: Add nubWith, nubOrd

GHC-2
#2717: Add nubWith, nubOrd
---------------------------------+------------------------------------------
    Reporter:  Bart Massey       |        Owner:                  
        Type:  proposal          |       Status:  new            
    Priority:  normal            |    Milestone:                  
   Component:  libraries/base    |      Version:                  
    Severity:  normal            |   Resolution:                  
    Keywords:                    |     Testcase:                  
Architecture:  Unknown/Multiple  |           Os:  Unknown/Multiple
---------------------------------+------------------------------------------
Comment (by Bart Massey):

 Discussion period two weeks, until 2008/11/3.

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2717#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #2717: Add nubWith, nubOrd

GHC-2
In reply to this post by GHC-2
#2717: Add nubWith, nubOrd
------------------------------+---------------------------------------------
 Reporter:  Bart Massey       |          Owner:                  
     Type:  proposal          |         Status:  new            
 Priority:  normal            |      Milestone:  Not GHC        
Component:  libraries/base    |        Version:                  
 Severity:  normal            |     Resolution:                  
 Keywords:                    |     Difficulty:  Unknown        
 Testcase:                    |   Architecture:  Unknown/Multiple
       Os:  Unknown/Multiple  |  
------------------------------+---------------------------------------------
Changes (by igloo):

  * difficulty:  => Unknown
  * milestone:  => Not GHC

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2717#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #2717: Add nubWith, nubOrd

GHC-2
In reply to this post by GHC-2
#2717: Add nubWith, nubOrd
---------------------------------+------------------------------------------
    Reporter:  Bart Massey       |        Owner:                  
        Type:  proposal          |       Status:  new            
    Priority:  normal            |    Milestone:  Not GHC        
   Component:  libraries/base    |      Version:                  
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown        
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by Bart Massey):

 I've attached two patches---base.patch against libraries/base and
 containers.patch against libraries/containers---that conform to the
 general list consensus on functionality.  Data.List is now unchanged
 except for documentation.  Data.Set implements nubOrd, and Data.IntSet
 implements nubInt.

 I will ask for one more round of patch review and then request that these
 patches be applied.

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2717#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs