Skip to content

Commit

Permalink
Add some todo comments in the Statistics module
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Sep 2, 2024
1 parent 37abe3f commit 5f2ec04
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Streamly/Statistics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,25 @@ import Prelude hiding (length, sum, minimum, maximum)
-- Re-exports
-------------------------------------------------------------------------------

-- XXX Deprecate these once the streamly functions are released.

-- {-# DEPRECATED lmap "Use Streamly.Data.Fold.windowLmap instead" #-}
lmap :: (c -> a) -> Fold m (a, Maybe a) b -> Fold m (c, Maybe c) b
lmap = Window.windowLmap

-- {-# DEPRECATED length "Use Streamly.Data.Fold.windowLength instead" #-}
length :: (Monad m, Num b) => Fold m (a, Maybe a) b
length = Window.windowLength

-- {-# DEPRECATED sum "Use Streamly.Data.Fold.windowSum instead" #-}
sum :: (Monad m, Num a) => Fold m (a, Maybe a) a
sum = Window.windowSum

-- {-# DEPRECATED sumInt "Use Streamly.Data.Fold.windowSumInt instead" #-}
sumInt :: (Monad m, Integral a) => Fold m (a, Maybe a) a
sumInt = Window.windowSumInt

-- {-# DEPRECATED powerSum "Use Streamly.Data.Fold.windowPowerSum instead" #-}
powerSum :: (Monad m, Num a) => Int -> Fold m (a, Maybe a) a
powerSum = Window.windowPowerSum

Expand Down Expand Up @@ -342,6 +349,10 @@ fft marr
-- Location
-------------------------------------------------------------------------------

-- XXX prefix window to these folds and implement these using the scans. or
-- just remove these as the corresponding scans can be converted to folds. If
-- we remove these we can just export the scans through this module itself.

-- Theoretically, we can approximate minimum in a rolling window by using a
-- 'powerMean' with sufficiently large negative power.
--
Expand Down

0 comments on commit 5f2ec04

Please sign in to comment.