#5431: Add popCount to Data.Bits
---------------------------------+------------------------------------------
    Reporter:  tibbe             |       Owner:                
        Type:  feature request   |      Status:  new           
    Priority:  normal            |   Component:  libraries/base
     Version:  7.2.1             |    Keywords:                
    Testcase:                    |   Blockedby:                
          Os:  Unknown/Multiple  |    Blocking:                
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown  
---------------------------------+------------------------------------------
 Now when we have a fast `popCnt#` primop it would be nice to expose it to
 the world through an official API. I propose we add this method to the
 `Bits` class in `Data.Bits`:

 {{{
 -- | Return the number of set bits in the argument, know as the
 -- population count or the Hamming weight.
 popCount :: a -> Int
 }}}

 The proposal was discussed and agreed upon in this thread:
 http://thread.gmane.org/gmane.comp.lang.haskell.libraries/16073

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5431>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to