hyperloglog 0.4.4 → 0.4.5
raw patch · 5 files changed
+22/−52 lines, 5 filesdep −ghc-primdep ~basedep ~hashablePVP ok
version bump matches the API change (PVP)
Dependencies removed: ghc-prim
Dependency ranges changed: base, hashable
API changes (from Hackage documentation)
Files
- CHANGELOG.markdown +5/−0
- hyperloglog.cabal +9/−12
- src/Data/HyperLogLog.hs +0/−3
- src/Data/HyperLogLog/Config.hs +3/−10
- src/Data/HyperLogLog/Type.hs +5/−27
CHANGELOG.markdown view
@@ -1,3 +1,8 @@+0.4.5 [2021.11.16]+------------------+* Drop support for pre-8.0 versions of GHC.+* Allow building with `hashable-1.4.*`.+ 0.4.4 [2021.02.17] ------------------ * Allow building with `lens-5.*`.
hyperloglog.cabal view
@@ -1,6 +1,6 @@ name: hyperloglog category: Numeric-version: 0.4.4+version: 0.4.5 license: BSD3 cabal-version: >= 1.10 license-file: LICENSE@@ -11,14 +11,14 @@ bug-reports: http://github.com/analytics/hyperloglog/issues copyright: Copyright (C) 2013-2015 Edward A. Kmett build-type: Simple-tested-with: GHC == 7.8.4- , GHC == 7.10.3- , GHC == 8.0.2+tested-with: GHC == 8.0.2 , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5- , GHC == 8.8.3- , GHC == 8.10.1+ , GHC == 8.8.4+ , GHC == 8.10.7+ , GHC == 9.0.1+ , GHC == 9.2.1 synopsis: An approximate streaming (constant space) unique object counter description: This package provides an approximate streaming (constant space) unique object counter.@@ -48,7 +48,7 @@ library build-depends: approximate >= 0.2.1 && < 1,- base >= 4.7 && < 5,+ base >= 4.9 && < 5, binary >= 0.5 && < 0.9, bits >= 0.2 && < 1, bytes >= 0.7 && < 1,@@ -57,7 +57,7 @@ comonad >= 4 && < 6, deepseq >= 1.3 && < 1.5, distributive >= 0.3 && < 1,- hashable >= 1.1.2.3 && < 1.4,+ hashable >= 1.1.2.3 && < 1.5, lens >= 4 && < 6, reflection >= 1.3 && < 3, semigroupoids >= 4 && < 6,@@ -71,14 +71,11 @@ cpp-options: -DHERBIE ghc-options: -fplugin=Herbie - if impl(ghc < 7.6)- build-depends: ghc-prim- exposed-modules: Data.HyperLogLog Data.HyperLogLog.Config Data.HyperLogLog.Type - ghc-options: -Wall -fwarn-tabs -O2+ ghc-options: -Wall -Wtabs -O2 hs-source-dirs: src default-language: Haskell2010
src/Data/HyperLogLog.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} -------------------------------------------------------------------- -- | -- Copyright : (c) Edward Kmett 2013-2015@@ -20,9 +19,7 @@ , insert , insertHash , cast-#if __GLASGOW_HASKELL__ >= 708 , coerceConfig-#endif ) where import Data.HyperLogLog.Type
src/Data/HyperLogLog/Config.hs view
@@ -1,14 +1,10 @@-{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-cse #-} {-# OPTIONS_GHC -fno-full-laziness #-} {-# OPTIONS_GHC -fno-float-in #-}-{-# OPTIONS_GHC -fno-warn-unused-binds #-}--#if __GLASGOW_HASKELL__ >= 705-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE PolyKinds #-}-#endif+{-# OPTIONS_GHC -Wno-unused-binds #-} -------------------------------------------------------------------- -- |@@ -40,9 +36,6 @@ import Data.Bits.Extras import Data.Vector.Serialize () import GHC.Int-#if __GLASGOW_HASKELL__ < 710-import GHC.Word-#endif type Rank = Int8
src/Data/HyperLogLog/Type.hs view
@@ -6,22 +6,16 @@ {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE GeneralizedNewtypeDeriving#-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-}+{-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MonoLocalBinds #-} {-# OPTIONS_GHC -fno-cse #-} {-# OPTIONS_GHC -fno-full-laziness #-} {-# OPTIONS_GHC -fno-float-in #-}-{-# OPTIONS_GHC -fno-warn-unused-binds #-}--#if __GLASGOW_HASKELL__ >= 706-{-# LANGUAGE PolyKinds #-}-#endif--#if __GLASGOW_HASKELL__ >= 707-{-# LANGUAGE RoleAnnotations #-}-#endif+{-# OPTIONS_GHC -Wno-unused-binds #-} -------------------------------------------------------------------- -- |@@ -47,9 +41,7 @@ , insertHash , intersectionSize , cast-#if __GLASGOW_HASKELL__ >= 708 , coerceConfig-#endif ) where import Control.DeepSeq (NFData (..))@@ -66,21 +58,12 @@ import Data.Proxy import Data.Reflection import Data.Serialize as Serialize+import Data.Type.Coercion (Coercion(..)) import qualified Data.Vector.Unboxed as V import qualified Data.Vector.Unboxed.Mutable as MV import GHC.Generics hiding (D, to) import GHC.Int -#if MIN_VERSION_base(4,7,0)-import Data.Type.Coercion (Coercion(..))-#endif--#if !(MIN_VERSION_base(4,8,0))-import Control.Applicative-import Data.Monoid (Monoid(..))-import Data.Word-#endif- #if !(MIN_VERSION_base(4,11,0)) import Data.Semigroup (Semigroup(..)) #endif@@ -118,19 +101,14 @@ -- approximate counter. newtype HyperLogLog p = HyperLogLog { runHyperLogLog :: V.Vector Rank } deriving (Eq, Show, Generic, NFData)+type role HyperLogLog nominal -#if __GLASGOW_HASKELL__ >= 708 -- | If two types @p@ and @q@ reify the same configuration, then we can coerce -- between @'HyperLogLog' p@ and @'HyperLogLog' q@. We do this by building -- a hole in the @nominal@ role for the configuration parameter. coerceConfig :: forall p q . (Reifies p Integer, Reifies q Integer) => Maybe (Coercion (HyperLogLog p) (HyperLogLog q)) coerceConfig | reflect (Proxy :: Proxy p) == reflect (Proxy :: Proxy q) = Just Coercion | otherwise = Nothing-#endif--#if __GLASGOW_HASKELL__ >= 707-type role HyperLogLog nominal-#endif instance Serialize (HyperLogLog p)