packages feed

cuckoo 0.2.0.1 → 0.2.1

raw patch · 5 files changed

+36/−12 lines, 5 filesdep ~primitivePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: primitive

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,13 @@ # Revision history for cuckoo +## 0.2.1 -- 2020-08-06++* Support random-1.2.0++* Fix doctest test-suite++* Relax lower bound of primitive to 0.6.4.0+ ## 0.2.0.1 -- 2019-08-20  * Fixed and improved example.
cuckoo.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: cuckoo-version: 0.2.0.1+version: 0.2.1 synopsis: Haskell Implementation of Cuckoo Filters Description:     Haskell implementation of Cuckoo filters as described in@@ -25,11 +25,12 @@ license-file: LICENSE author: Lars Kuhtz maintainer: lakuhtz@gmail.com-copyright: Copyright (c) 2019, Lars Kuhtz <lakuhtz@gmail.com>+copyright: Copyright (c) 2019-2020 Lars Kuhtz <lakuhtz@gmail.com> category: Data tested-with:-      GHC==8.6.5-      GHC==8.4.4+    GHC==8.10.1+    GHC==8.8.4+    GHC==8.6.5 extra-source-files:     README.md     CHANGELOG.md@@ -57,7 +58,7 @@         -Wall     build-depends:           base >=4.11 && <4.15-        , primitive >=0.7+        , primitive >=0.6.4.0      if flag(pcg-random)         build-depends:@@ -86,7 +87,7 @@         -- external         , base >=4.11 && <4.15         , memory >=0.14-        , primitive >=0.7+        , primitive >=0.6.4.0         , vector >=0.12  test-suite tests@@ -122,8 +123,11 @@         -with-rtsopts=-N     main-is: doctest.hs     build-depends:-          base >=4.11 && <4.15+          cuckoo+        , base >=4.11 && <4.15         , doctest >= 0.16+        , memory >=0.14+        , primitive >=0.6.4.0  benchmark spellchecker     type: exitcode-stdio-1.0
lib/random/System/Random/Internal.hs view
@@ -57,7 +57,12 @@  import Control.Monad.Primitive import Data.STRef++#if MIN_VERSION_random(1,2,0)+import System.Random hiding (uniform, uniformR)+#else import System.Random+#endif  type Variate a = (Random a) 
src/Data/Cuckoo.hs view
@@ -4,6 +4,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-}+{-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} @@ -126,7 +127,7 @@  import Prelude hiding (null) -import System.Random.Internal+import "cuckoo" System.Random.Internal  import Text.Printf 
src/Data/Cuckoo/Internal.hs view
@@ -66,9 +66,12 @@ -- -- For instance, ----- prop> fit 7 3 == 3--- prop> fit 6 3 == 2+-- >>> fit 7 3+-- 3 --+-- >>> fit 6 3+-- 2+-- fit :: Real a => Real b => Integral c => a -> b -> c fit a b = ceiling @Double $ realToFrac a / realToFrac b {-# INLINE fit #-}@@ -78,8 +81,11 @@ -- -- For instance, ----- prop> fit 7 3 == 3--- prop> fit 6 3 == 2+-- >>> intFit 7 3+-- 3+--+-- >>> intFit 6 3+-- 2 -- intFit :: Integral a => Integral b => a -> b -> a intFit a b = 1 + (a - 1) `div` int b