[Final Summary] Proposal: add new Data.Bits.Bits(bitZero) method

Herbert Valerio Riedel hvr at gnu.org
Sat Mar 8 10:15:20 UTC 2014

On 2014-02-22 at 11:03:12 +0100, Herbert Valerio Riedel wrote:
> Here's the result of the proposal
>>> Introduce a new class method
>>>   class Bits a where
>>>       ...
>>>       -- | Value with all bits cleared
>>>       <0-value-method> :: a
>>>       ...
>>> modulo naming of '<0-value-method>'

Unless I missed any votes, the current tally stands at

for `Bits.zero`

 - ARJANEN Loïc Jean David
 - Henning Thielemann
 - Herbert Valerio Riedel (+0.99)

for 'Data.Bits.zeroBits'

 - Edward Kmett
 - Eric Mertens
 - Herbert Valerio Riedel
 - Twan van Laarhoven
 - (maybe?) ARJANEN Loïc Jean David
 - Anthony Cowley (+0.5)

This tilts the majority towards the name 'zeroBits'

As the proposal-deadline was close to the RC2 release, this made it into
GHC 7.8.1-RC2, and therefore GHC 7.8.1/base- will come with

Fwiw, there were some alternative names suggested, but those didn't gain
significant support:

  cleared, noBits, clearedBits, whereDidTheBitsGo, notOneBit, allZeroes

Beyond this proposal, it was hinted at that we might also want a name for
'complement zeroBits' (although that maybe a FiniteBits-instance), names
suggested for that were

  allBits, allOnes, oneBits, iHaveAllTheBits, everyLastBit


 [1]: http://git.haskell.org/packages/base.git/commitdiff/147bca65bfac216bddff3ccde89409ca6323bb62

More information about the Libraries mailing list