[GHC] #13203: Implement Bits Natural clearBit

GHC ghc-devs at haskell.org
Mon Oct 16 20:19:33 UTC 2017


#13203: Implement Bits Natural clearBit
-------------------------------------+-------------------------------------
        Reporter:  dylex             |                Owner:  supersven
            Type:  bug               |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  libraries/base    |              Version:  8.0.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Herbert Valerio Riedel <hvr@…>):

 In [changeset:"5984a698fc2974b719365a9647a7cae1bed51eec/ghc"
 5984a698/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="5984a698fc2974b719365a9647a7cae1bed51eec"
 Override default `clearBit` method impl for `Natural`

 The default implementation of `clearBit` is in terms of
 `complement`. However, `complement` is not well-defined
 for `Natural` and this consequently renders the default
 implementation of `clearBit` dysfunctional.

 This implements `clearBit` in terms of `testBit`
 and `setBit` which are both well-defined for `Natural`s.

 This addresses #13203
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13203#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list