packages feed

hw-rankselect 0.13.1.0 → 0.13.2.0

raw patch · 3 files changed

+46/−20 lines, 3 filesdep ~QuickCheckdep ~optparse-applicativePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: QuickCheck, optparse-applicative

API changes (from Hackage documentation)

Files

app/App/Commands/Build.hs view
@@ -17,7 +17,6 @@  import qualified App.Commands.Options.Type                            as Z import qualified HaskellWorks.Data.RankSelect.CsPoppy                 as CS-import qualified HaskellWorks.Data.RankSelect.CsPoppy.Internal.Alpha0 as A0 import qualified HaskellWorks.Data.RankSelect.CsPoppy.Internal.Alpha1 as A1 import qualified HaskellWorks.Data.RankSelect.Poppy512                as P512 
hw-rankselect.cabal view
@@ -1,7 +1,7 @@ cabal-version:  2.2  name:           hw-rankselect-version:        0.13.1.0+version:        0.13.2.0 synopsis:       Rank-select description:    Please see README.md category:       Data, Bit, Succinct Data Structures, Data Structures@@ -38,8 +38,8 @@ common directory            { build-depends: directory            >= 1.2        && < 1.5    } common generic-lens         { build-depends: generic-lens         >= 1.0.0.0    && < 1.2    } common hedgehog             { build-depends: hedgehog             >= 1.0        && < 1.1    }-common hspec                { build-depends: hspec                >= 2.4        && < 2.6    }-common hw-balancedparens    { build-depends: hw-balancedparens    >= 0.2.2.0    && < 0.3    }+common hspec                { build-depends: hspec                >= 2.4        && < 3      }+common hw-balancedparens    { build-depends: hw-balancedparens    >= 0.2.2.0    && < 0.4    } common hw-bits              { build-depends: hw-bits              >= 0.4.0.0    && < 0.8    } common hw-fingertree        { build-depends: hw-fingertree        >= 0.1.1.0    && < 1.2    } common hw-hedgehog          { build-depends: hw-hedgehog          >= 0.1.0.1    && < 0.2    }
test/HaskellWorks/Data/RankSelect/BitSeqSpec.hs view
@@ -98,22 +98,49 @@     ps        <- forAll $ pure $ BS.fromBools bs      BS.toBools (ps |> b) === BS.toBools ps <> [b]-  it "select1" $ requireTest $ do-    n         <- forAll $ G.count (R.linear 0 1000)-    bools     <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool-    bs        <- forAll $ pure $ BS.fromBools bools-    i         <- forAll $ G.count (R.linear 0 n)+  describe "one bitseq" $ do+    it "select1" $ requireTest $ do+      n         <- forAll $ G.count (R.linear 0 1000)+      bools     <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool+      bs        <- forAll $ pure $ BS.fromBools bools+      i         <- forAll $ G.count (R.linear 0 n) -    select1 bools i === select1 bs i-  it "rank1" $ requireTest $ do-    n         <- forAll $ G.count (R.linear 0 1000)-    bools     <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool-    bs        <- forAll $ pure $ BS.fromBools bools-    i         <- forAll $ G.count (R.linear 0 (popCount1 bools))+      select1 bools i === select1 bs i+    it "rank1" $ requireTest $ do+      n         <- forAll $ G.count (R.linear 0 1000)+      bools     <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool+      bs        <- forAll $ pure $ BS.fromBools bools+      i         <- forAll $ G.count (R.linear 0 (popCount1 bools)) -    rank1 bools i === rank1 bs i-  it "popCount1" $ requireTest $ do-    bools     <- forAll $ G.list (R.linear 0 1000) G.bool-    bs        <- forAll $ pure $ BS.fromBools bools+      rank1 bools i === rank1 bs i+    it "popCount1" $ requireTest $ do+      bools     <- forAll $ G.list (R.linear 0 1000) G.bool+      bs        <- forAll $ pure $ BS.fromBools bools -    popCount1 bools === popCount1 bs+      popCount1 bools === popCount1 bs+  describe "concatenated bitseq" $ do+    it "select1" $ requireTest $ do+      n         <- forAll $ G.count (R.linear 0 1000)+      bools1    <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool+      bools2    <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool+      bs1       <- forAll $ pure $ BS.fromBools bools1+      bs2       <- forAll $ pure $ BS.fromBools bools2+      i         <- forAll $ G.count (R.linear 0 n)++      select1 (bools1 <> bools2) i === select1 (bs1 <> bs2) i+    it "rank1" $ requireTest $ do+      n         <- forAll $ G.count (R.linear 0 1000)+      bools1    <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool+      bools2    <- forAll $ G.list (R.singleton (fromIntegral n)) G.bool+      bs1       <- forAll $ pure $ BS.fromBools bools1+      bs2       <- forAll $ pure $ BS.fromBools bools2+      i         <- forAll $ G.count (R.linear 0 (popCount1 (bools1 <> bools2)))++      rank1 (bools1 <> bools2) i === rank1 (bs1 <> bs2) i+    it "popCount1" $ requireTest $ do+      bools1    <- forAll $ G.list (R.linear 0 1000) G.bool+      bools2    <- forAll $ G.list (R.linear 0 1000) G.bool+      bs1       <- forAll $ pure $ BS.fromBools bools1+      bs2       <- forAll $ pure $ BS.fromBools bools2++      popCount1 (bools1 <> bools2) === popCount1 (bs1 <> bs2)