Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use streamly core 0.2 #69

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Use streamly core 0.2 #69

merged 1 commit into from
Dec 7, 2023

Conversation

harendra-kumar
Copy link
Member

No description provided.

-- Re-exports
-------------------------------------------------------------------------------

lmap :: (c -> a) -> Fold m (a, Maybe a) b -> Fold m (c, Maybe c) b
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep the window prefix?
That way this module can be imported as Fold. Will play well with streamly stuff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. that would be a breaking change
  2. all combinators in this module are window, therefore, all of them will have to be prefixed

So this should be a separate change, if at all we want make that change.

@@ -552,16 +569,17 @@ welfordMean = Fold step initial extract
-- /Time/: \(\mathcal{O}(n)\)
{-# INLINE rawMoment #-}
rawMoment :: (Monad m, Fractional a) => Int -> Fold m (a, Maybe a) a
rawMoment k = Fold.teeWith (/) (Window.powerSum k) Window.length
rawMoment k = Fold.teeWith (/) (Window.windowPowerSum k) Window.windowLength
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

powerSum vs Window.powerSum They are the same. We should just keep the window prefix.

@@ -109,7 +109,7 @@ library
import: ghc-options
exposed-modules: Streamly.Statistics
build-depends: base >= 4.9 && < 5
, streamly-core == 0.1.0
, streamly-core >= 0.2.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can put a < 0.3.0 upper bound.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I omitted it deliberately so that we do not have to change it too often especially in unstable packages.

@harendra-kumar harendra-kumar force-pushed the streamly-core-0.2 branch 2 times, most recently from e55d08b to bc7a44b Compare December 7, 2023 10:40
@harendra-kumar harendra-kumar merged commit e598da7 into master Dec 7, 2023
6 of 7 checks passed
@harendra-kumar harendra-kumar deleted the streamly-core-0.2 branch December 7, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants