[commit: ghc] master: Add `FiniteBits(count{Leading, Trailing}Zeros)` (a8a969a)

git at git.haskell.org git at git.haskell.org
Sun Aug 31 14:28:04 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a8a969ae7a05e408b29961d0a2ea621a16d73d3e/ghc

>---------------------------------------------------------------

commit a8a969ae7a05e408b29961d0a2ea621a16d73d3e
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Thu Aug 14 12:32:32 2014 +0200

    Add `FiniteBits(count{Leading,Trailing}Zeros)`
    
    This exposes the newly added CLZ/CTZ primops from
    e0c1767d0ea8d12e0a4badf43682a08784e379c6 (re #9340)
    via two new methods `countLeadingZeros` and `countTrailingZeros`
    in the `Data.Bits.FiniteBits` class.
    
    The original proposal can be found at
    
      http://www.haskell.org/pipermail/libraries/2014-August/023567.html
    
    Test Plan: successful validate
    
    Reviewers: ekmett, tibbe
    
    GHC Trac Issues: #9532
    
    Differential Revision: https://phabricator.haskell.org/D158


>---------------------------------------------------------------

a8a969ae7a05e408b29961d0a2ea621a16d73d3e
 libraries/base/Data/Bits.hs                        | 72 ++++++++++++++++-
 libraries/base/GHC/Int.hs                          | 13 ++++
 libraries/base/GHC/Word.hs                         |  8 ++
 libraries/base/changelog.md                        |  3 +
 libraries/base/tests/.gitignore                    |  1 +
 libraries/base/tests/T9532.hs                      | 89 ++++++++++++++++++++++
 .../base/tests/T9532.stdout                        |  0
 libraries/base/tests/all.T                         |  1 +
 8 files changed, 185 insertions(+), 2 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc a8a969ae7a05e408b29961d0a2ea621a16d73d3e


More information about the ghc-commits mailing list