Changelog for streamly-0.5.1
0.5.1
- Performance improvements, especially space consumption, for concurrent streams
0.5.0
Bug Fixes
- Leftover threads are now cleaned up as soon as the consumer is garbage collected.
- Fix a bug in concurrent function application that in certain cases would unnecessarily share the concurrency state resulting in incorrect output stream.
- Fix passing of state across
parallel,async,wAsync,ahead,serial,wSerialcombinators. Without this fix combinators that rely on state passing e.g.maxThreadsandmaxBufferwon't work across these combinators.
Enhancements
- Added rate limiting combinators
rate,avgRate,minRate,maxRateandconstRateto control the yield rate of a stream. - Add
foldl1',foldr1,intersperseM,find,lookup,and,or,findIndices,findIndex,elemIndices,elemIndex,initto Prelude
Deprecations
- The
Streamly.Timemodule is now deprecated, its functionality is subsumed by the new rate limiting combinators.
0.4.1
Bug Fixes
- foldxM was not fully strict, fixed.
0.4.0
Breaking changes
- Signatures of
zipWithMandzipAsyncWithMhave changed - Some functions in prelude now require an additional
Monadconstraint on the underlying type of the stream.
Deprecations
oncehas been deprecated and renamed toyieldM
Enhancements
- Add concurrency control primitives
maxThreadsandmaxBuffer. - Concurrency of a stream with bounded concurrency when used with
takeis now limited by the number of elements demanded bytake. - Significant performance improvements utilizing stream fusion optimizations.
- Add
yieldto construct a singleton stream from a pure value - Add
repeatto generate an infinite stream by repeating a pure value - Add
fromListandfromListMto generate streams from lists, faster thanfromFoldableandfromFoldableM - Add
mapas a synonym of fmap - Add
scanlM', the monadic version of scanl' - Add
takeWhileManddropWhileM - Add
filterM
0.3.0
Breaking changes
- Some prelude functions, to whom concurrency capability has been added, will
now require a
MonadAsyncconstraint.
Bug Fixes
- Fixed a race due to which, in a rare case, we might block indefinitely on an MVar due to a lost wakeup.
- Fixed an issue in adaptive concurrency. The issue caused us to stop creating more worker threads in some cases due to a race. This bug would not cause any functional issue but may reduce concurrency in some cases.
Enhancements
- Added a concurrent lookahead stream type
Ahead - Added
fromFoldableMAPI that creates a stream from a container of monadic actions - Monadic stream generation functions
consM,|:,unfoldrM,replicateM,repeatM,iterateMandfromFoldableMcan now generate streams concurrently when used with concurrent stream types. - Monad transformation functions
mapMandsequencecan now map actions concurrently when used at appropriate stream types. - Added concurrent function application operators to run stages of a stream processing function application pipeline concurrently.
- Added
mapMaybeandmapMaybeM.
0.2.1
Bug Fixes
- Fixed a bug that caused some transformation ops to return incorrect results
when used with concurrent streams. The affected ops are
take,filter,takeWhile,drop,dropWhile, andreverse.
0.2.0
Breaking changes
-
Changed the semantics of the Semigroup instance for
InterleavedT,AsyncTandParallelT. The new semantics are as follows:- For
InterleavedT,<>operation interleaves two streams - For
AsyncT,<>now concurrently merges two streams in a left biased manner using demand based concurrency. - For
ParallelT, the<>operation now concurrently meges the two streams in a fairly parallel manner.
To adapt to the new changes, replace
<>withserialwherever it is used for stream types other thanStreamT. - For
-
Remove the
Alternativeinstance. To adapt to this change replace any usage of<|>withparallelandemptywithnil. -
Stream type now defaults to the
SerialTtype unless explicitly specified using a type combinator or a monomorphic type. This change reduces puzzling type errors for beginners. It includes the following two changes:- Change the type of all stream elimination functions to use
SerialTinstead of a polymorphic type. This makes sure that the stream type is always fixed at all exits. - Change the type combinators (e.g.
parallely) to only fix the argument stream type and the output stream type remains polymorphic.
Stream types may have to be changed or type combinators may have to be added or removed to adapt to this change.
- Change the type of all stream elimination functions to use
-
Change the type of
foldrMto make it consistent withfoldrMin base. -
asyncis renamed tomkAsyncandasyncis now a new API with a different meaning. -
ZipAsyncis renamed toZipAsyncMandZipAsyncis now ZipAsyncM specialized to the IO Monad. -
Remove the
MonadErrorinstance as it was not working correctly for parallel compositions. UseMonadThrowinstead for error propagation. -
Remove Num/Fractional/Floating instances as they are not very useful. Use
fmapandliftA2instead.
Deprecations
- Deprecate and rename the following symbols:
StreamingtoIsStreamrunStreamingtorunStreamStreamTtoSerialTInterleavedTtoWSerialTZipStreamtoZipSerialMZipAsynctoZipAsyncMinterleavingtowSeriallyzippingtozipSeriallyzippingAsynctozipAsyncly<=>towSerial<|toasynceachtofromFoldablescantoscanxfoldltofoldxfoldlMtofoldxM
- Deprecate the following symbols for future removal:
runStreamTrunInterleavedTrunAsyncTrunParallelTrunZipStreamrunZipAsync
Enhancements
- Add the following functions:
consMand|:operator to construct streams from monadic actionsonceto create a singleton stream from a monadic actionrepeatMto construct a stream by repeating a monadic actionscanl'strict left scanfoldl'strict left foldfoldlM'strict left fold with a monadic fold functionserialrun two streams serially one after the otherasyncrun two streams asynchronouslyparallelrun two streams in parallel (replaces<|>)WAsyncTstream type for BFS version ofAsyncTcomposition
- Add simpler stream types that are specialized to the IO monad
- Put a bound (1500) on the output buffer used for asynchronous tasks
- Put a limit (1500) on the number of threads used for Async and WAsync types
0.1.2
Enhancements
- Add
iterate,iterateMstream operations
Bug Fixes
- Fixed a bug that casued unexpected behavior when
purewas used to inject values in Applicative composition ofZipStreamandZipAsynctypes.
0.1.1
Enhancements
- Make
consright associative and provide an operator form.:for it - Add
null,tail,reverse,replicateM,scanstream operations - Improve performance of some stream operations (
foldl,dropWhile)
Bug Fixes
- Fix the
productoperation. Earlier, it always returned 0 due to a bug - Fix the
lastoperation, which returnedNothingfor singleton streams
0.1.0
- Initial release