packages feed

hw-rankselect 0.13.3.1 → 0.13.3.2

raw patch · 7 files changed

+41/−23 lines, 7 filesdep +doctestdep +doctest-discoverdep ~QuickCheckdep ~generic-lensPVP ok

version bump matches the API change (PVP)

Dependencies added: doctest, doctest-discover

Dependency ranges changed: QuickCheck, generic-lens

API changes (from Hackage documentation)

Files

+ doctest/DoctestDriver.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE CPP #-}++#if MIN_VERSION_GLASGOW_HASKELL(8,4,4,0)+{-# OPTIONS_GHC -F -pgmF doctest-discover #-}+#else+module Main where++import qualified System.IO as IO++main :: IO ()+main = IO.putStrLn "WARNING: doctest will not run on GHC versions earlier than 8.4.4"+#endif
hw-rankselect.cabal view
@@ -1,7 +1,7 @@ cabal-version:  2.2  name:                   hw-rankselect-version:                0.13.3.1+version:                0.13.3.2 synopsis:               Rank-select description:            Please see README.md category:               Data, Bit, Succinct Data Structures, Data Structures@@ -35,6 +35,8 @@ common criterion            { build-depends: criterion            >= 1.1        && < 1.6    } common deepseq              { build-depends: deepseq              >= 1.4        && < 1.5    } common directory            { build-depends: directory            >= 1.2        && < 1.5    }+common doctest              { build-depends: doctest              >= 0.16.2     && < 0.17   }+common doctest-discover     { build-depends: doctest-discover     >= 0.2        && < 0.3    } common generic-lens         { build-depends: generic-lens         >= 1.2.0.1    && < 1.3    } common hedgehog             { build-depends: hedgehog             >= 1.0        && < 1.1    } common hspec                { build-depends: hspec                >= 2.4        && < 3      }@@ -102,10 +104,8 @@                       , hw-prim                       , vector   exposed-modules:      HaskellWorks.Data.RankSelect.Gen-                        Paths_hw_rankselect   build-depends:        hw-rankselect   hs-source-dirs:       gen-  autogen-modules:      Paths_hw_rankselect  executable hw-rankselect   import:               base, config@@ -127,8 +127,6 @@                         App.Commands.SelectAll                         App.Commands.UnitTest                         App.Commands.Validate-                        Paths_hw_rankselect-  autogen-modules:      Paths_hw_rankselect   hs-source-dirs:       app   default-extensions:   OverloadedStrings TupleSections   ghc-options:          -threaded -rtsopts -with-rtsopts=-N@@ -162,8 +160,6 @@                         HaskellWorks.Data.RankSelect.SpecCommon                         HaskellWorks.Data.RankSelect.ValidateSpec                         Test.Common-                        Paths_hw_rankselect-  autogen-modules:      Paths_hw_rankselect   hs-source-dirs:       test   build-tool-depends:   hspec-discover:hspec-discover   ghc-options:          -threaded -rtsopts -with-rtsopts=-N@@ -183,7 +179,16 @@   build-depends:        hw-rankselect   type:                 exitcode-stdio-1.0   main-is:              Main.hs-  autogen-modules:      Paths_hw_rankselect-  other-modules:        Paths_hw_rankselect   hs-source-dirs:       bench   ghc-options:          -threaded -rtsopts -with-rtsopts=-N++test-suite doctest+  import:               base, config+                      , doctest+                      , doctest-discover+                      , hw-rankselect+  type:                 exitcode-stdio-1.0+  ghc-options:          -threaded+  main-is:              DoctestDriver.hs+  HS-Source-Dirs:       doctest+  build-tool-depends:   doctest-discover:doctest-discover
src/HaskellWorks/Data/RankSelect/CsPoppy/Internal/Alpha0.hs view
@@ -53,10 +53,10 @@         layerS          = genCsSamples layerMPopCount vv  makeCsPoppyBlocks :: DVS.Vector Word64 -> DVS.Vector Word64-makeCsPoppyBlocks vv = DVS.constructN (((DVS.length vv + 8 - 1) `div` 8) + 1) genBlocks+makeCsPoppyBlocks vv = DVS.generate (((DVS.length vv + 8 - 1) `div` 8) + 1) genBlocks   where e = DVS.length vv-        genBlocks :: DVS.Vector Word64 -> Word64-        genBlocks u = let i = DVS.length u in if+        genBlocks :: Int -> Word64+        genBlocks u = let i = fromIntegral u in if           | (i + 1) * 8 <= e -> let j = i * 8 in               popCount0 (DVS.unsafeIndex vv (j + 0)) +               popCount0 (DVS.unsafeIndex vv (j + 1)) +@@ -77,7 +77,7 @@                 let lb = DVS.unsafeIndex blocksv (fromIntegral (ui * 4 - 3)) in                 let lc = DVS.unsafeIndex blocksv (fromIntegral (ui * 4 - 2)) in                 let ld = DVS.unsafeIndex blocksv (fromIntegral (ui * 4 - 1)) in-                let nx = lx + (la + lb + lc + ld)                           in+                let nx = lx + (la + lb + lc + ld)                            in                 let na = DVS.unsafeIndex blocksv (fromIntegral (ui * 4 + 0)) in                 let nb = DVS.unsafeIndex blocksv (fromIntegral (ui * 4 + 1)) in                 let nc = DVS.unsafeIndex blocksv (fromIntegral (ui * 4 + 2)) in@@ -85,7 +85,7 @@                 .|. ((na .<. 32) .&. 0x000003ff00000000)                 .|. ((nb .<. 42) .&. 0x000ffc0000000000)                 .|. ((nc .<. 52) .&. 0x3ff0000000000000))-          else  let lx = lastOrZero u                     in+          else  let lx = lastOrZero u                      in                 let la = indexOrZero blocksv (ui * 4 - 4)  in                 let lb = indexOrZero blocksv (ui * 4 - 3)  in                 let lc = indexOrZero blocksv (ui * 4 - 2)  in
src/HaskellWorks/Data/RankSelect/CsPoppy/Internal/Alpha1.hs view
@@ -53,10 +53,10 @@         layerS          = genCsSamples layerMPopCount v  makeCsPoppyBlocks :: DVS.Vector Word64 -> DVS.Vector Word64-makeCsPoppyBlocks v = DVS.constructN (((DVS.length v + 8 - 1) `div` 8) + 1) genBlocks+makeCsPoppyBlocks v = DVS.generate (((DVS.length v + 8 - 1) `div` 8) + 1) genBlocks   where e = DVS.length v-        genBlocks :: DVS.Vector Word64 -> Word64-        genBlocks u = let i = DVS.length u in if+        genBlocks :: Int -> Word64+        genBlocks u = let i = fromIntegral u in if           | (i + 1) * 8 <= e -> let j = i * 8 in               popCount1 (DVS.unsafeIndex v (j + 0)) +               popCount1 (DVS.unsafeIndex v (j + 1)) +
src/HaskellWorks/Data/RankSelect/Poppy512.hs view
@@ -65,7 +65,8 @@   { poppy512Bits  = v   , poppy512Index = DVS.constructN (((DVS.length v + 7) `div` 8) + 1) gen512Index   }-  where gen512Index u = let indexN = DVS.length u - 1 in+  where gen512Index :: DVS.Vector Word64 -> Word64+        gen512Index u = let indexN = DVS.length u - 1 in           if indexN == -1             then 0             else popCount1 (DVS.take 8 (DVS.drop (indexN * 8) v)) + DVS.last u
test/HaskellWorks/Data/RankSelect/BitSeqSpec.hs view
@@ -19,8 +19,8 @@ import qualified Hedgehog.Gen                               as G import qualified Hedgehog.Range                             as R -{-# ANN module ("HLint: Ignore Redundant do"        :: String) #-}-{-# ANN module ("HLint: Ignore Reduce duplication"  :: String) #-}+{-# ANN module ("HLint: ignore Redundant do"        :: String) #-}+{-# ANN module ("HLint: ignore Reduce duplication"  :: String) #-}  spec :: Spec spec = describe "HaskellWorks.Data.RankSelect.Internal.BitSeqSpec" $ do
test/HaskellWorks/Data/RankSelect/CsPoppy/InternalSpec.hs view
@@ -20,9 +20,9 @@ {-# ANN module ("HLint: ignore Reduce duplication"  :: String) #-}  makeCsPoppyBlocksRef :: DVS.Vector Word64 -> DVS.Vector Word64-makeCsPoppyBlocksRef v = DVS.constructN (((DVS.length v + 8 - 1) `div` 8) + 1) genBlocks-  where genBlocks :: DVS.Vector Word64 -> Word64-        genBlocks u = let i = DVS.length u in popCount1 (DVS.take 8 (DVS.drop (i * 8) v))+makeCsPoppyBlocksRef v = DVS.generate (((DVS.length v + 8 - 1) `div` 8) + 1) genBlocks+  where genBlocks :: Int -> Word64+        genBlocks u = let i = fromIntegral u in popCount1 (DVS.take 8 (DVS.drop (i * 8) v))  spec :: Spec spec = describe "HaskellWorks.Data.RankSelect.CsInterleavedSpec" $ do