[GHC] #9532: Expose new CLZ/CTZ primops via `Data.Bits` interface

GHC ghc-devs at haskell.org
Mon Sep 1 07:57:10 UTC 2014


#9532: Expose new CLZ/CTZ primops via `Data.Bits` interface
-------------------------------------+-------------------------------------
              Reporter:  hvr         |            Owner:  hvr
                  Type:  task        |           Status:  closed
              Priority:  normal      |        Milestone:  7.10.1
             Component:              |          Version:
  libraries/base                     |         Keywords:  Data.Bits
            Resolution:  fixed       |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:  #9340
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D158   |
-------------------------------------+-------------------------------------

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

 In [changeset:"3241ac56d371220ed0b9522a86678678532f48bc/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="3241ac56d371220ed0b9522a86678678532f48bc"
 Remove incorrect property in docstring (re #9532)

 The property

   countLeadingZeros . negate = const 0

 doesn't generally hold and it's not such a useful property to state, as
 it simply follows from "sign-bit == most-significant-bit" for FiniteBits
 types which use twos-complement representation for negative values, and
 even then it breaks down for 0...

 TLDR, remove thinko from documentation of `countLeadingZeros`
 }}}

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


More information about the ghc-tickets mailing list