histogram-fill 0.8.3.0 → 0.8.4.0
raw patch · 10 files changed
+37/−9 lines, 10 filesdep +ghc-primPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: ghc-prim
API changes (from Hackage documentation)
- Data.Histogram.Bin.BinF: instance NFData (BinF f)
+ Data.Histogram.Bin.BinF: instance NFData f => NFData (BinF f)
+ Data.Histogram.Bin.Classes: instance Constructor C1_0CutDirection
+ Data.Histogram.Bin.Classes: instance Constructor C1_1CutDirection
+ Data.Histogram.Bin.Classes: instance Data CutDirection
+ Data.Histogram.Bin.Classes: instance Datatype D1CutDirection
+ Data.Histogram.Bin.Classes: instance Generic CutDirection
+ Data.Histogram.Bin.Classes: instance Show CutDirection
+ Data.Histogram.Bin.Classes: instance Typeable CutDirection
+ Data.Histogram.Bin.Extra: instance NFData (BinEnum2D i)
+ Data.Histogram.Bin.Extra: instance NFData b => NFData (BinPermute b)
+ Data.Histogram.Bin.MaybeBin: instance NFData bin => NFData (MaybeBin bin)
Files
- ChangeLog +9/−0
- Data/Histogram/Bin/BinEnum.hs +2/−1
- Data/Histogram/Bin/BinF.hs +4/−2
- Data/Histogram/Bin/BinI.hs +2/−1
- Data/Histogram/Bin/BinInt.hs +2/−1
- Data/Histogram/Bin/Classes.hs +6/−1
- Data/Histogram/Bin/Extra.hs +5/−1
- Data/Histogram/Bin/LogBinD.hs +2/−1
- Data/Histogram/Bin/MaybeBin.hs +3/−0
- histogram-fill.cabal +2/−1
ChangeLog view
@@ -1,3 +1,12 @@+Changes in 0.8.4.0++ * Missing instances for CutDirection added++ * Missing NFData instances for MaybeBin, BinEnum2D, BinPermute++ * Compatibility with deepseq 1.4++ Changes in 0.8.3.0 * Constraints are relaxed from `PrimMonad' to `Monad' wherever possible in
Data/Histogram/Bin/BinEnum.hs view
@@ -51,4 +51,5 @@ instance Read (BinEnum a) where readPrec = keyword "BinEnum" >> liftM BinEnum readPrec -instance NFData (BinEnum a)+instance NFData (BinEnum a) where+ rnf b = b `seq` ()
Data/Histogram/Bin/BinF.hs view
@@ -128,7 +128,8 @@ instance (Read f, RealFrac f) => Read (BinF f) where readPrec = keyword "BinF" >> liftM3 BinF (value "Base") (value "Step") (value "N") -instance NFData (BinF f)+instance NFData f => NFData (BinF f) where+ rnf (BinF a b _) = rnf a `seq` rnf b @@ -235,4 +236,5 @@ instance Read BinD where readPrec = keyword "BinD" >> liftM3 BinD (value "Base") (value "Step") (value "N") -instance NFData BinD+instance NFData BinD where+ rnf b = b `seq` ()
Data/Histogram/Bin/BinI.hs view
@@ -76,4 +76,5 @@ instance Read BinI where readPrec = keyword "BinI" >> liftM2 BinI (value "Low") (value "High") -instance NFData BinI+instance NFData BinI where+ rnf b = b `seq` ()
Data/Histogram/Bin/BinInt.hs view
@@ -109,4 +109,5 @@ instance Read BinInt where readPrec = keyword "BinInt" >> liftM3 BinInt (value "Base") (value "Step") (value "Bins") -instance NFData BinInt+instance NFData BinInt where+ rnf b = b `seq` ()
Data/Histogram/Bin/Classes.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE DeriveGeneric #-} -- | -- Module : Data.Histogram.Bin -- Copyright : Copyright (c) 2011, Alexey Khudyakov <alexey.skladnoy@gmail.com>@@ -31,10 +33,13 @@ , ConvertBin(..) ) where +import Data.Data (Typeable,Data) import qualified Data.Vector.Generic as G import Data.Vector.Generic (Vector)+import GHC.Generics (Generic) + -- | This type represent some abstract data binning algorithms. It -- maps sets/intervals of values of type 'BinValue b' to integer -- indices.@@ -121,7 +126,7 @@ -- | How index should be dropped data CutDirection = CutLower -- ^ Drop bins with smallest index | CutHigher -- ^ Drop bins with bigger index-+ deriving (Show,Typeable,Data,Generic) -- | Bin which support rebinning. class Bin b => MergeableBin b where
Data/Histogram/Bin/Extra.hs view
@@ -24,6 +24,7 @@ import Control.Applicative ((<$>), Applicative(..)) import Control.Monad (forM_,liftM2, guard) import Control.Monad.ST (ST)+import Control.DeepSeq (NFData(..)) import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Unboxed.Mutable as M@@ -81,6 +82,8 @@ keyword "BinEnum2D" liftM2 binEnum2D (value "Low") (value "High") +instance NFData (BinEnum2D i) where+ rnf b = b `seq` () ---------------------------------------------------------------- -- Permutation@@ -124,6 +127,8 @@ Nothing -> fail "Invalid permutation" return $ BinPermute b to from +instance NFData b => NFData (BinPermute b) where+ rnf (BinPermute b va vb) = rnf b `seq` va `seq` vb `seq` () -- Check whether this viable permutation checkPermutationTable :: Bin b => b -> U.Vector Int -> Maybe (U.Vector Int)@@ -162,4 +167,3 @@ checkPermutationTable b (invertPermutationTable to) where to = U.map f $ U.enumFromN 0 (nBins b)-
Data/Histogram/Bin/LogBinD.hs view
@@ -110,4 +110,5 @@ keyword "LogBinD" liftM3 logBinD (value "Lo") (value "N") (value "Hi") -instance NFData LogBinD+instance NFData LogBinD where+ rnf b = b `seq` ()
Data/Histogram/Bin/MaybeBin.hs view
@@ -7,6 +7,7 @@ ) where import Control.Monad (liftM)+import Control.DeepSeq (NFData(..)) import Data.Typeable (Typeable) import Text.Read (Read(..)) @@ -44,6 +45,8 @@ keyword "MaybeBin" liftM MaybeBin readPrec +instance NFData bin => NFData (MaybeBin bin) where+ rnf (MaybeBin b) = rnf b -- | Drop bin with no events fromMaybeBin :: (Bin b, G.Vector v a) => H.Histogram v (MaybeBin b) a -> H.Histogram v b a
histogram-fill.cabal view
@@ -1,5 +1,5 @@ Name: histogram-fill-Version: 0.8.3.0+Version: 0.8.4.0 Synopsis: Library for histograms creation. Description: This is library for histograms filling. Its aim to provide@@ -31,6 +31,7 @@ base >=3 && <5, deepseq, primitive,+ ghc-prim, monad-primitive >= 0.1, vector >= 0.10.0.1 Exposed-modules: