1. 31 Aug, 2014 2 commits
    • Herbert Valerio Riedel's avatar
      Add `FiniteBits(count{Leading,Trailing}Zeros)` · a8a969ae
      Herbert Valerio Riedel authored
      This exposes the newly added CLZ/CTZ primops from
      e0c1767d (re #9340)
      via two new methods `countLeadingZeros` and `countTrailingZeros`
      in the `Data.Bits.FiniteBits` class.
      The original proposal can be found at
      Test Plan: successful validate
      Reviewers: ekmett, tibbe
      GHC Trac Issues: #9532
      Differential Revision: https://phabricator.haskell.org/D158
    • Herbert Valerio Riedel's avatar
      Re-export Word from Prelude (re #9531) · 393b8202
      Herbert Valerio Riedel authored
      The original proposal text can be found at
      The proposal passed with a clear majority, and was additionally
      confirmed by the core libraries committee.
      *Compatibility Note*
      Only code that imports `Data.Word` for the sole purpose of using `Word`
      *and* requires to be `-Werror`-clean (due to `-fwarn-unused-imports`)
      is affected by this change.
      In order to write warning-free forward/backward compatible against `base`,
      a variant of the following CPP-based snippet can be used:
        -- Starting with base>4.7.0 or GHC>7.8 Prelude re-exports 'Word'
        -- The following is needed, if 'Word' is the *only* entity needed from Data.Word
        #ifdef MIN_VERSION_base
        # if !MIN_VERSION_base(4,7,1)
        import Data.Word (Word)
        # endif
        -- no cabal_macros.h -- fallback to __GLASGOW_HASKELL__
        #elif __GLASGOW_HASKELL__ < 709
        import Data.Word (Word)
      This also updates the haddock submodule in order to avoid a compile warning
  2. 30 Aug, 2014 3 commits
  3. 29 Aug, 2014 35 commits