OrderedBits 0.0.0.2 → 0.0.0.3
raw patch · 3 files changed
+18/−7 lines, 3 filesdep ~vectorPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: vector
API changes (from Hackage documentation)
- Data.Bits.Ordered: instance Ranked Int
- Data.Bits.Ordered: instance Ranked Word
+ Data.Bits.Ordered: instance Data.Bits.Extras.Ranked GHC.Types.Int
+ Data.Bits.Ordered: instance Data.Bits.Extras.Ranked GHC.Types.Word
- Data.Bits.Ordered: popShiftL :: Ranked t => t -> t -> t
+ Data.Bits.Ordered: popShiftL :: (Ranked t) => t -> t -> t
- Data.Bits.Ordered: popShiftR :: Ranked t => t -> t -> t
+ Data.Bits.Ordered: popShiftR :: (Ranked t) => t -> t -> t
Files
- Data/Bits/Ordered.hs +10/−4
- OrderedBits.cabal +3/−3
- changelog.md +5/−0
Data/Bits/Ordered.hs view
@@ -30,21 +30,23 @@ , activeBitsL , activeBitsS , activeBitsV- -- temporary ) where import Control.Arrow import Data.Bits import Data.Bits.Extras import Data.Ord (comparing)+import Data.Vector.Fusion.Util import Data.Vector.Unboxed (Unbox) import Data.Word(Word(..))-import Debug.Trace import qualified Data.Vector.Algorithms.Intro as AI-import qualified Data.Vector.Fusion.Stream as S import qualified Data.Vector.Fusion.Stream.Monadic as SM import qualified Data.Vector.Generic as VG import qualified Data.Vector.Unboxed as VU+#if MIN_VERSION_vector(0,11,0)+import Data.Vector.Fusion.Bundle.Size+import qualified Data.Vector.Fusion.Bundle.Monadic as BM+#endif @@ -85,14 +87,18 @@ -- | List of all active bits, from lowest to highest. activeBitsL :: Ranked t => t -> [Int]-activeBitsL = S.toList . activeBitsS+activeBitsL = unId . SM.toList . activeBitsS {-# Inline activeBitsL #-} -- | A generic vector (specializes to the corrept type) of the active bits, -- lowest to highest. activeBitsV :: (Ranked t, VG.Vector v Int) => t -> v Int+#if MIN_VERSION_vector(0,11,0)+activeBitsV = VG.unstream . flip BM.fromStream Unknown . activeBitsS+#else activeBitsV = VG.unstream . activeBitsS+#endif {-# Inline activeBitsV #-} -- | A stream with the currently active bits, lowest to highest.
OrderedBits.cabal view
@@ -1,5 +1,5 @@ name: OrderedBits-version: 0.0.0.2+version: 0.0.0.3 author: Christian Hoener zu Siederdissen copyright: Christian Hoener zu Siederdissen, 2014 - 2015 homepage: https://github.com/choener/OrderedBits@@ -11,7 +11,7 @@ build-type: Simple stability: experimental cabal-version: >= 1.10.0-tested-with: GHC == 7.8.4, GHC == 7.10.1+tested-with: GHC == 7.8.4, GHC == 7.10.2 synopsis: Efficient ordered (by popcount) enumeration of bits description: This library provides efficient methods to enumerate all@@ -35,7 +35,7 @@ , bits >= 0.4 && < 0.5 , primitive >= 0.5 && < 0.7 , QuickCheck >= 2.7 && < 2.9- , vector >= 0.10 && < 0.11+ , vector >= 0.10 && < 0.12 , vector-algorithms >= 0.6 && < 0.7.1 default-language: Haskell2010
changelog.md view
@@ -1,3 +1,8 @@+0.0.0.3+-------++- vector <= 0.11 supported (with conditional compilation)+ 0.0.0.2 -------