3.5 KiB
Unreleased
Breaking changes
-
Change the semantics of the Semigroup instance for
InterleavedT
,AsyncT
andParallelT
. 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
<>
withserial
wherever it is used for stream types other thanStreamT
. - For
-
Change the semantics of
Alternative
instance. The<|>
operator now has a different behavior for each type. See the documentation for more details. To adapt to this change replace any usage of<|>
withparallel
andempty
withnil
. -
Stream type now defaults to the
SerialT
type 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
SerialT
instead 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
foldrM
to make it consistent withfoldrM
in base. -
Remove the MonadError instance as it was not working correctly for parallel compositions. Use MonadThrow instead for error propagation.
-
Remove Num/Fractional/Floating instances as they are not very useful. Use
fmap
andliftA2
instead.
Deprecations
- Deprecate and rename the following symbols:
Streaming
toIsStream
runStreaming
torunStream
StreamT
toSerialT
AsyncT
toCoparallelT
ZipStream
toZipSerial
ZipAsync
toZipParallel
interleaving
tocoserially
asyncly
tocoparallely
zipping
tozipSerially
zippingAsync
tozipParallely
<=>
tocoserial
<|
tocoparallel
each
tofromFoldable
scan
toscanx
foldl
tofoldx
foldlM
tofoldxM
zipAsyncWith
tozipParallelWith
zipAsyncWithM
tozipParallelWithM
- Deprecate and remove the following symbols:
runStreamT
runInterleavedT
runAsyncT
runParallelT
runZipStream
runZipAsync
Enhancements
- Add the following functions:
scanl'
strict left scanfoldl'
strict left foldfoldlM'
strict left fold with a monadic fold functionserial
run two streams serially one after the otherparallel
run two streams in parallel (replaces<|>
)
0.1.2
Enhancements
- Add
iterate
,iterateM
stream operations
Bug Fixes
- Fixed a bug that casued unexpected behavior when
pure
was used to inject values in Applicative composition ofZipStream
andZipAsync
types.
0.1.1
Enhancements
- Make
cons
right associative and provide an operator form.:
for it - Add
null
,tail
,reverse
,replicateM
,scan
stream operations - Improve performance of some stream operations (
foldl
,dropWhile
)
Bug Fixes
- Fix the
product
operation. Earlier, it always returned 0 due to a bug - Fix the
last
operation, which returnedNothing
for singleton streams
0.1.0
- Initial release