mirror of
https://github.com/composewell/streamly.git
synced 2024-09-11 11:37:22 +03:00
Deprecate variance and stdDev in folds
This commit is contained in:
parent
f81f8b5bf3
commit
0d2ce6ca76
@ -8,6 +8,7 @@
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
|
||||
|
||||
module Main (main) where
|
||||
|
||||
|
@ -162,8 +162,6 @@ module Streamly.Data.Fold
|
||||
, minimumBy
|
||||
, minimum
|
||||
, mean
|
||||
, variance
|
||||
, stdDev
|
||||
, rollingHash
|
||||
, rollingHashWithSalt
|
||||
|
||||
@ -270,6 +268,8 @@ module Streamly.Data.Fold
|
||||
-- * Deprecated
|
||||
, sequence
|
||||
, mapM
|
||||
, variance
|
||||
, stdDev
|
||||
)
|
||||
where
|
||||
|
||||
|
@ -57,8 +57,6 @@ module Streamly.Internal.Data.Fold
|
||||
, countDistinct
|
||||
, countDistinctInt
|
||||
, mean
|
||||
, variance
|
||||
, stdDev
|
||||
, rollingHash
|
||||
, rollingHashWithSalt
|
||||
, rollingHashFirstN
|
||||
@ -285,6 +283,8 @@ module Streamly.Internal.Data.Fold
|
||||
-- * Deprecated
|
||||
, sequence
|
||||
, mapM
|
||||
, variance
|
||||
, stdDev
|
||||
)
|
||||
where
|
||||
|
||||
@ -794,6 +794,7 @@ mean = fmap done $ foldl' step begin
|
||||
-- the input stream.
|
||||
--
|
||||
-- @since 0.7.0
|
||||
{-# DEPRECATED variance "Use the streamly-statistics package instead" #-}
|
||||
{-# INLINE variance #-}
|
||||
variance :: (Monad m, Fractional a) => Fold m a a
|
||||
variance = fmap done $ foldl' step begin
|
||||
@ -817,6 +818,7 @@ variance = fmap done $ foldl' step begin
|
||||
-- elements in the input stream.
|
||||
--
|
||||
-- @since 0.7.0
|
||||
{-# DEPRECATED stdDev "Use the streamly-statistics package instead" #-}
|
||||
{-# INLINE stdDev #-}
|
||||
stdDev :: (Monad m, Floating a) => Fold m a a
|
||||
stdDev = sqrt <$> variance
|
||||
|
@ -8,6 +8,13 @@
|
||||
readChunksWithBufferOf -> readChunksWith
|
||||
writeWithBufferOf -> writeWith
|
||||
writeChunksWithBufferOf -> writeChunksWith
|
||||
|
||||
### Deprecations
|
||||
|
||||
* In `Streamly.Data.Fold`:
|
||||
* `variance`, and `stdDev` have been deprecated. Please use the
|
||||
`streamly-statistics` package instead.
|
||||
|
||||
## 0.8.2 (Mar 2022)
|
||||
|
||||
* Fix performance issues for GHC-9. These changes coupled with GHC changes
|
||||
|
@ -1,3 +1,5 @@
|
||||
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
|
||||
|
||||
module Main (main) where
|
||||
|
||||
import Data.List (sort)
|
||||
|
Loading…
Reference in New Issue
Block a user