packages feed

monoid-statistics 1.1.4 → 1.1.5

raw patch · 3 files changed

+15/−2 lines, 3 filesdep ~doctestPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: doctest

API changes (from Hackage documentation)

+ Data.Monoid.Statistics.Numeric: instance Data.Bifunctor.Bifunctor Data.Monoid.Statistics.Numeric.Weighted

Files

Changelog.md view
@@ -1,3 +1,8 @@+# Changes in 1.1.5++- Bifunctor instance is added to `Weighted`++ # Changes in 1.1.4  - Actually export `CountW`
Data/Monoid/Statistics/Numeric.hs view
@@ -59,6 +59,7 @@   ) where  import Control.Monad.Catch          (MonadThrow(..))+import Data.Bifunctor import Data.Data                    (Typeable,Data) import Data.Vector.Unboxed          (Unbox) import Data.Vector.Unboxed.Deriving (derivingUnbox)@@ -477,6 +478,13 @@ data Weighted w a = Weighted w a   deriving stock (Show,Eq,Ord,Data,Generic,Functor,Foldable,Traversable) +instance Bifunctor Weighted where+  first  f   (Weighted w a) = Weighted (f w) a+  second f   (Weighted w a) = Weighted w (f a)+  bimap  f g (Weighted w a) =Weighted (f w) (g a)+  {-# INLINE first  #-}+  {-# INLINE second #-}+  {-# INLINE bimap  #-}   ----------------------------------------------------------------
monoid-statistics.cabal view
@@ -1,5 +1,5 @@ Name:           monoid-statistics-Version:        1.1.4+Version:        1.1.5 Cabal-Version:  >= 1.10 License:        BSD3 License-File:   LICENSE@@ -83,7 +83,7 @@   default-language: Haskell2010   build-depends:         base                >=4.9  && <5-      , doctest             >=0.15 && <0.21+      , doctest             >=0.15 && <0.23       , monoid-statistics   -any  benchmark monoid-stat-bench