diff --git a/cabal.project.Werror b/cabal.project.Werror index b7e662b..c768f06 100644 --- a/cabal.project.Werror +++ b/cabal.project.Werror @@ -3,12 +3,12 @@ packages: streamly-statistics.cabal source-repository-package type: git location: https://github.com/composewell/streamly.git - tag: master + tag: 3f46653cb06605bff25cc8fc81dc7ed732ef31b5 source-repository-package type: git location: https://github.com/composewell/streamly.git - tag: master + tag: 3f46653cb06605bff25cc8fc81dc7ed732ef31b5 subdir: core jobs: 1 diff --git a/cabal.project.user b/cabal.project.user index d6d62c7..80d5264 100644 --- a/cabal.project.user +++ b/cabal.project.user @@ -3,12 +3,12 @@ packages: streamly-statistics.cabal source-repository-package type: git location: https://github.com/composewell/streamly.git - tag: master + tag: 3f46653cb06605bff25cc8fc81dc7ed732ef31b5 source-repository-package type: git location: https://github.com/composewell/streamly.git - tag: master + tag: 3f46653cb06605bff25cc8fc81dc7ed732ef31b5 subdir: core jobs: 1 diff --git a/src/Streamly/Statistics/Scanl.hs b/src/Streamly/Statistics/Scanl.hs index acec45b..a75b148 100644 --- a/src/Streamly/Statistics/Scanl.hs +++ b/src/Streamly/Statistics/Scanl.hs @@ -157,7 +157,7 @@ incrMinimum = Scanl step initial extract extract (w + 1) (headCheck i q (w + 1) & dqloop (i, a)) - step (Tuple3' i w q) (Replace new _) = + step (Tuple3' i w q) (Replace1 _ new) = return $ Partial $ Tuple3' (i + 1) w (headCheck i q w & dqloop (i, new)) @@ -216,7 +216,7 @@ incrMaximum = Scanl step initial extract extract (w + 1) (headCheck i q (w + 1) & dqloop (i, a)) - step (Tuple3' i w q) (Replace new _) = + step (Tuple3' i w q) (Replace1 _ new) = return $ Partial $ Tuple3' (i + 1) w (headCheck i q w & dqloop (i, new)) @@ -296,7 +296,7 @@ incrWelfordMean = Scanl step initial extract extract step (Tuple' oldMean w) (Insert new) = return $ Partial $ Tuple' (meanAdd w oldMean new) (w + 1) - step (Tuple' oldMean w) (Replace new old) = + step (Tuple' oldMean w) (Replace1 old new) = return $ Partial $ Tuple' (meanReplace w oldMean old new) w extract (Tuple' x _) = return x @@ -531,7 +531,7 @@ incrEwma w = Scanl step initial extract extract let s1 = w * x + (1 - w) * s return $ Partial (EwmaGo s1 (k * (1 - w))) - step (EwmaGo s k) (Replace x x0, rng) = do + step (EwmaGo s k) (Replace1 x0 x, rng) = do x1 <- Ring.unsafeGetIndex 0 rng let s1 = w * x + (1 - w) * s + k * (x1 - x0) return $ Partial (EwmaGo s1 k) @@ -782,6 +782,6 @@ incrFrequency = Scanl.mkScanl step Map.empty step refCountMap (Insert new) = Map.insertWith (+) new 1 refCountMap - step refCountMap (Replace new old) = + step refCountMap (Replace1 old new) = let m1 = Map.insertWith (+) new 1 refCountMap in Map.update decrement old m1 diff --git a/stack.yaml b/stack.yaml index f1fea7a..c9b2e30 100644 --- a/stack.yaml +++ b/stack.yaml @@ -7,9 +7,9 @@ packages: extra-deps: - github: composewell/streamly - commit: "3fc854472d4f0582ea0451e216ddc9f054908e62" + commit: "3f46653cb06605bff25cc8fc81dc7ed732ef31b5" - github: composewell/streamly - commit: "3fc854472d4f0582ea0451e216ddc9f054908e62" + commit: "3f46653cb06605bff25cc8fc81dc7ed732ef31b5" subdirs: - core