packages feed

histogram-fill 0.8.5.0 → 0.9.0.0

raw patch · 3 files changed

+21/−5 lines, 3 filesdep +semigroupsdep ~basePVP ok

version bump matches the API change (PVP)

Dependencies added: semigroups

Dependency ranges changed: base

API changes (from Hackage documentation)

- Data.Histogram.Bin.Bin2D: type (:><:) = Bin2D
+ Data.Histogram.Bin.Bin2D: type :><: = Bin2D
+ Data.Histogram.Fill: instance (GHC.Base.Monad m, Data.Semigroup.Semigroup b) => Data.Semigroup.Semigroup (Data.Histogram.Fill.HBuilderM m a b)
+ Data.Histogram.Fill: instance Data.Semigroup.Semigroup b => Data.Semigroup.Semigroup (Data.Histogram.Fill.HBuilder a b)
- Data.Histogram.Bin.Classes: class Bin b where type BinValue b inRange b x = i >= 0 && i < nBins b where i = toIndex b x where {
+ Data.Histogram.Bin.Classes: class Bin b where {
- Data.Histogram.Bin.Classes: class (Bin b, Ord (BinValue b)) => IntervalBin b where binsList b = generate (nBins b) (binInterval b)
+ Data.Histogram.Bin.Classes: class (Bin b, Ord (BinValue b)) => IntervalBin b
- Data.Histogram.Bin.Classes: class VariableBin b => UniformBin b where binSize b = binSizeN b 0
+ Data.Histogram.Bin.Classes: class VariableBin b => UniformBin b

Files

ChangeLog.md view
@@ -1,3 +1,8 @@+Changes in 0.9.0.0++  * GHC 8.4 compatibility. Semigroup instances added for `HBuilder` and+    `HBuilderM`. `semigroups` dependency added for older GHCs+ Changes in 0.8.5.0    * BinVar added
Data/Histogram/Fill.hs view
@@ -67,6 +67,7 @@ import Control.Monad.Primitive  import Data.Monoid            (Monoid(..))+import Data.Semigroup         (Semigroup(..)) import Data.Vector.Unboxed    (Unbox) import Data.Primitive.MutVar import qualified Data.Vector.Generic as G@@ -232,13 +233,18 @@                                         return (a b)                         } +instance (Monad m, Semigroup b) => Semigroup (HBuilderM m a b) where+    (<>) = liftA2 (<>)+    {-# INLINE (<>) #-}+ instance (Monad m, Monoid b) => Monoid (HBuilderM m a b) where     mempty = HBuilderM { hbInput  = \_ -> return ()                        , hbOutput = return mempty                        }-    mappend h1 h2 = mappend <$> h1 <*> h2+    mappend = liftA2 mappend     mconcat = fmap mconcat . F.sequenceA     {-# INLINE mempty  #-}+    {-# INLINE mappend #-}     {-# INLINE mconcat #-}  @@ -289,10 +295,13 @@ instance Applicative (HBuilder a) where     pure x  = HBuilder (return $ pure x)     (HBuilder f) <*> (HBuilder g) = HBuilder $ liftM2 (<*>) f g+instance Semigroup b => Semigroup (HBuilder a b) where+    (<>) = liftA2 (<>)+    {-# INLINE (<>) #-} instance Monoid b => Monoid (HBuilder a b) where-    mempty      = HBuilder (return mempty)-    mappend h g = mappend <$> h <*> g-    mconcat     = fmap mconcat . F.sequenceA+    mempty  = HBuilder (return mempty)+    mappend = liftA2 mappend+    mconcat = fmap mconcat . F.sequenceA     {-# INLINE mempty  #-}     {-# INLINE mappend #-}     {-# INLINE mconcat #-}
histogram-fill.cabal view
@@ -1,5 +1,5 @@ Name:           histogram-fill-Version:        0.8.5.0+Version:        0.9.0.0 Synopsis:       Library for histograms creation. Description:   This is library for histograms filling. Its aim to provide@@ -32,6 +32,8 @@                , primitive       >= 0.5                , ghc-prim                , vector          >= 0.10.0.1+  if impl(ghc < 8.0)+    Build-Depends: semigroups >= 0.18   Exposed-modules:     Data.Histogram     Data.Histogram.Generic