Re: [GHC] #1408: groupWhen – a groupBy that compares consecutive values

GHC trac at galois.com
Wed Jun 6 08:00:10 EDT 2007


#1408: groupWhen – a groupBy that compares consecutive values
------------------------------------------------------------+---------------
    Reporter:  Joachim Breitner <mail at joachim-breitner.de>  |        Owner:             
        Type:  feature request                              |       Status:  new        
    Priority:  normal                                       |    Milestone:             
   Component:  libraries/base                               |      Version:  6.6.1      
    Severity:  normal                                       |   Resolution:             
    Keywords:                                               |   Difficulty:  Easy (1 hr)
          Os:  Unknown                                      |     Testcase:             
Architecture:  Unknown                                      |  
------------------------------------------------------------+---------------
Changes (by ross):

  * component:  libraries (other) => libraries/base

Comment:

 The Haskell 98 Report (s17.6) says "When the `By` function replaces an
 `Eq` context by a binary predicate, the predicate is assumed to define an
 equivalence".  Since the new function agrees with `groupBy` in that case,
 I think it would be reasonable to redefine `groupBy` as this more useful
 version.

 The same applies to `nubBy`, and possibly `deleteBy`, `deleteFirstsBy` and
 `intersectBy` (which could have more general types to make this clear).

 On the downside, it would mess up the simple uniform treatment of the `By`
 functions.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1408>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list