@@ -1,6 +1,6 @@
11## Unreleased
22
3−### Behavioral changes
3+### Breaking behavior changes
44
55* `Streamly.Prelude.fold` may now terminate early without consuming the entire
66 stream. For example, `fold Fold.head stream` would now terminate immediately
@@ -15,11 +15,11 @@
1515* `encodeLatin1` now silently truncates any character beyond 255 to incorrect
1616 characters in the input stream. Use `encodeLatin1'` to recover previous
1717 functionality.
18−* The zipping function in `Streamly.Prelude.zipWith` and
19− `Streamly.Prelude.zipWithM` is now applied concurrently for concurrent
18+* The zipping functions `Streamly.Prelude.zipWith` and
19+ `Streamly.Prelude.zipWithM` are now applied concurrently for concurrent
2020 streams.
2121
22−### Breaking changes
22+### Breaking type changes
2323
2424* Change the signature of `foldlM'` to make the initial value of the
2525 accumulator monadic.
@@ -31,39 +31,59 @@
3131 require an additional `MonadAsync` constraint. Several other
3232 functions that used these functions also now require the additional
3333 constraint.
34−* Remove `Applicative` instance of folds. Please use `teeWith` or the `Tee`
35− type as an alternative to Fold applicative. To convert existing code:
3634
37− ```
38− avg = (/) <$> Fold.sum <*> Fold.length
39− ```
35+Removed `Applicative` instance of folds. Please use `teeWith` or the `Tee`
36+type as an alternative to Fold applicative.
37+
38+To upgrade, the following code:
39+
40+```
41+ avg = (/) <$> Fold.sum <*> Fold.length
42+```
4043
41− Would become:
44+can be changed to:
4245
43− ```
44− import Streamly.Internal.Data.Fold.Tee (Tee(..))
45− import qualified Streamly.Internal.Data.Fold.Tee as Tee
46− avg = Tee.toFold $ (/) <$> Tee Fold.sum <*> Tee Fold.length
47− ```
46+```
47+ import Streamly.Internal.Data.Fold.Tee (Tee(..))
48+ import qualified Streamly.Internal.Data.Fold.Tee as Tee
49+ avg = Tee.toFold $ (/) <$> Tee Fold.sum <*> Tee Fold.length
50+```
4851
49− Or
52+or alternatively to:
5053
51− ```
52− avg = Fold.teeWith (/) Fold.sum Fold.length
53− ```
54+```
55+ avg = Fold.teeWith (/) Fold.sum Fold.length
56+```
5457
5558### Enhancements
5659
57−* `Streamly.Prelude`: Added delay, liftInner, runStateT, runReaderT,
58− intercalate, intercalateSuffix
59−* `Streamly.Unicode.Stream`: New encoding/decoding routines,
60− `encodeUtf8'`, `encodeLatin1'`, `decodeUtf8'`, are added, these routines
61− fail when they encounter any invalid characters.
62−* `Streamly.Data.Fold`: Several new functions added.
63−* `Streamly.Data.Fold.Tee`: New module for distributive fold operations.
64−* `Streamly.Data.Unfold`: Several Unfold routines and combinators added.
65−* Streamly.Network.Socket: Added readChunk, writeChunk,
66− writeChunksWithBufferOf, forSocketM
60+New modules:
61+
62+* Streamly.Console.Stdio
63+* Streamly.Data.Fold.Tee
64+
65+New APIs:
66+
67+* `Streamly.Data.Fold`: Many APIs added.
68+* `Streamly.Data.Unfold`: Many APIs added.
69+* `Streamly.Prelude`:
70+ * delay
71+ * foldMany
72+ * intercalate
73+ * intercalateSuffix
74+ * liftInner
75+ * runReaderT
76+ * runStateT
77+ * unfoldMany
78+* `Streamly.Unicode.Stream`:
79+ * encodeUtf8'
80+ * encodeLatin1'
81+ * decodeUtf8'
82+* `Streamly.Network.Socket`:
83+ * readChunk
84+ * writeChunk
85+ * writeChunksWithBufferOf
86+ * forSocketM
6787
6888### Bug Fixes
6989
@@ -79,48 +99,64 @@
7999
80100### Deprecations
81101
82−* Deprecate `Streamly.Memory.Array` in favor of
83− `Streamly.Data.Array.Foreign`
84−* Deprecate `Streamly.Data.Unicode.Stream` in favor of
85− `Streamly.Unicode.Stream`
86−* The `Streamly` module is now deprecated, its functionality is subsumed
87− by `Streamly.Prelude`.
88−* Some functions from `Streamly` module have been renamed in `Streamly.Prelude` module:
89− * `foldWith` to `concatFoldableWith`
90− * `foldMapWith` to `concatMapFoldableWith`
91− * `forEachWith` to `concatForFoldableWith`
92− * `serially` to `fromSerial` and so on
93−* In `Streamly.Prelude` the following functions have been renamed:
94− * `concatUnfold` to `unfoldMany`
95− * `yield` to `fromPure`
96− * `yieldM` to `fromEffect`
97−* The following encoding/decoding routines have been renamed:
98− * `encodeUtf8Lax` to `encodeUtf8`
99− * `encodeLatin1Lax` to `encodeLatin1`
100− * `decodeUtf8Lenient` to `decodeUtf8`
101−* Drop support for GHC 7.10.3.
102−* The following functions in `Streamly.Data.Fold` have been deprecated:
103− * `mapM` is replaced by `rmapM`
104− * `sequence` is dprecated, please use `rmapM id` instead.
105−
106−### Internal APIs
107−
108−* `Streamly.Internal.Prelude` renamed to `Streamly.Internal.Data.Stream.IsStream`
109−* Parser functionality is added via `Streamly.Internal.Data.Parser` module
110−* `Streamly.Internal.Data.Binary.Decode` module added for decoding Haskell
111− values from binary data.
112−* FileSystem event notification (fsnotify/inotify) functionality added via
113− `Streamly.Internal.FileSystem.Event.*` modules.
102+Modules renamed:
103+
104+* `Streamly` => Streamly.Prelude`
105+* `Streamly.Data.Unicode.Stream` => `Streamly.Unicode.Stream`
106+* `Streamly.Memory.Array` => `Streamly.Data.Array.Foreign`
107+
108+APIs renamed:
109+
110+* In `Streamly.Prelude` module (formerly in `Streamly` module):
111+ * `foldWith` => `concatFoldableWith`
112+ * `foldMapWith` => `concatMapFoldableWith`
113+ * `forEachWith` => `concatForFoldableWith`
114+ * `serially` => `fromSerial` and so on
115+* In `Streamly.Prelude`:
116+ * `concatUnfold` => `unfoldMany`
117+ * `yield` => `fromPure`
118+ * `yieldM` => `fromEffect`
119+* In `Streamly.Unicode.Stream` (formerly `Streamly.Data.Unicode.Stream`):
120+ * `encodeUtf8Lax` => `encodeUtf8`
121+ * `encodeLatin1Lax` => `encodeLatin1`
122+ * `decodeUtf8Lenient` => `decodeUtf8`
123+* In `Streamly.Data.Fold`:
124+ * `mapM` => `rmapM`
125+
126+APIs deprecated:
127+
128+* `sequence`: Please use `rmapM id` instead.
129+
130+### Notable Internal/Pre-release API Changes
131+
132+Breaking changes:
133+
114134* The `Fold` type has changed to accomodate terminating folds.
115−* Added `use-c-malloc` build flag to use the c library `malloc` for array
116− allocations.
117−* A bug was fixed in the conversion of MicroSecond64 and MilliSecond64
135+* Rename: `Streamly.Internal.Prelude` => `Streamly.Internal.Data.Stream.IsStream`
136+* Several other internal modules have been renamed and refactored.
137+
138+New modules:
139+
140+* `Streamly.Internal.Data.Parser`: parser combinators
141+* `Streamly.Internal.Data.Binary.Decode`: decode Haskell values from binary data.
142+* `Streamly.Internal.FileSystem.Event.*`: fsnotify/inotify
143+* `Streamly.Internal.Data.Array.Stream.Fold.Foreign`: array stream folds
144+
145+New features:
146+
147+* `use-c-malloc` build flag to use the c library `malloc` for array
148+ allocations. This could be useful to avoid pinned memory fragmentation.
149+
150+Bug fixes:
151+
152+* A bug was fixed in the conversion of `MicroSecond64` and `MilliSecond64`
118153 (commit e5119626)
119−* Bug fix: classifySessionsBy now flushes sessions at the end and terminates.
154+* Bug fix: `classifySessionsBy` now flushes sessions at the end and terminates.
120155
121156### Miscellaneous
122157
123−* The examples in this package are removed to a new github repo
158+* Drop support for GHC 7.10.3.
159+* The examples in this package are moved to a new github repo
124160 [streamly-examples](https://github.com/composewell/streamly-examples)
125161
126162## 0.7.3 (February 2021)