on master help sign in
Add docs regarding the eventual behaviour update of (<*>)
commitb9892e31196c2ad89c395400eb714467e01fb01e authorAdithya Kumar <adithya@composewell.com> dateThu 21 Jan 2021, 18:55 (6 years ago) parent1ea5c66
2 files changed+11
Changelog.md+5 src/Streamly/Internal/Data/Fold/Types.hs+6
Changelog.md+5
@@ -1,5 +1,10 @@
11## Unreleased
22
3+### Notice
4+
5+* In the next major release the behaviour of `<*>` for folds will be updated
6+ from `teeWith` to `splitWith` to reflect it's similarity with parsers.
7+
38### Behavioral changes
49
510* `Streamly.Prelude.fold` can now terminate early without consuming the entire
src/Streamly/Internal/Data/Fold/Types.hs+6
@@ -413,10 +413,16 @@ data GenericRunner sL sR bL bR
413413
414414-- | The fold resulting from '<*>' distributes its input to both the argument
415415-- folds and combines their output using the supplied function.
416+--
417+-- __Note:__ The Applicative behaviour will change in the next major release.
418+--
416419instance Monad m => Applicative (Fold m a) where
417420 {-# INLINE pure #-}
418421 pure = yield
419422
423+ -- | __Notice:__ In the next major release the behaviour of @<*>@ for folds
424+ -- will be updated from 'teeWith' to 'splitWith' to reflect it's similarity
425+ -- with parsers.
420426 {-# INLINE (<*>) #-}
421427 (<*>) = teeWith ($)
422428