|
2 | 2 |
|
3 | 3 | ## Unreleased |
4 | 4 |
|
5 | | -### Breaking Changes |
6 | | - |
7 | | -* In the `Streamly.Internal.Data.Parser` module, constructors `Partial`, |
8 | | - `Continue`, `Done` have been deprecated and replaced by `SPartial`, |
9 | | - `SContinue` and `SDone`. Old code can be changed to use new |
10 | | - constructors as follows: |
11 | | - * In the step function of a parser the constructors should be replaced as |
12 | | - follows: |
13 | | - - `Partial n` by `SPartial (1-n)` |
14 | | - - `Continue n` by `SContinue (1-n)` |
15 | | - - `Done n` by `SDone (1-n)` |
16 | | - - `Error` by `SError` |
17 | | - * The signature for the extract function is changed. It now returns |
18 | | - `Parser.Final` instead of `Parser.Step`. The constructors should be |
19 | | - replaced as follows: |
20 | | - - `Contine n` by `FContinue (-n)` |
21 | | - - `Done n` by `FDone (-n)` |
22 | | - - `Partial n` by `FContinue (-n)` |
23 | | - - `Error` by `FError` |
24 | | - * If the `n` returned by these constructors is used in making some decisions, |
25 | | - that will have to be modified accordingly. See the docs for more details. |
26 | | - |
27 | | -* Concurrent streams and folds now use separate types for concurrency |
28 | | - config. If you are importing the `Config` type from an incorrect module, |
29 | | - you will have to fix that. |
| 5 | +See [0.2.2-0.3.0 API Changelog](/core/docs/ApiChangelogs/0.2.2-0.3.0.txt) for a |
| 6 | +full list of deprecations, additions, and changes to the function signatures. |
30 | 7 |
|
31 | 8 | ### Enhancements |
32 | 9 |
|
33 | | -* Add APIs for prompt cleanup of allocated resources as well as cleanup of |
34 | | - concurrent threads. You can choose to use guaranteed prompt cleanup over GC |
35 | | - based cleanup by using the new APIs. |
36 | | -* Add several new concurrent combinators for folds in |
37 | | - `Streamly.Data.Fold.Prelude`. |
38 | | -* Add `Streamly.Data.Scanl` module is added for the new `Scanl` type. Composable |
39 | | - scans can be used to split streams into multiple streams, process them |
40 | | - independently (concurrently too) and merge the results. The `Fold` type has |
41 | | - been split in two types, `Fold` and `Scanl`. |
42 | | -* Add a `Path` type and some type wrappers for flexibly typed file |
43 | | - system paths, following modules are added: |
44 | | - - Streamly.FileSystem.Path |
45 | | - - Streamly.FileSystem.Path.Node |
46 | | - - Streamly.FileSystem.Path.Seg |
47 | | - - Streamly.FileSystem.Path.SegNode |
48 | | -* Add `Streamly.FileSystem.DirIO` and `Streamly.FileSystem.FileIO` |
49 | | - modules. These new module replace `Streamly.FileSystem.Dir`, |
50 | | - `Streamly.FileSystem.File` modules which have been deprecated. The |
51 | | - new modules have the same API as old ones except that they use |
52 | | - the streamly native `Path` type instead of `FilePath` for path |
53 | | - representation. The DirIO module API takes an additional ReadOptions |
54 | | - argument to modify the behavior. Please note that the directory read |
55 | | - APIs in the new module do not follow symlinks by default. |
56 | | -* Remove the `Storable` constraint from the following functions: |
57 | | - - Streamly.Data.Stream.isInfixOf |
58 | | - - Streamly.Data.Array.writeLastN |
59 | | - |
60 | | -### Deprecations and API changes |
61 | | - |
62 | | -* `Streamly.FileSystem.Dir`, `Streamly.FileSystem.File` modules have |
63 | | - been deprecated. |
64 | | -* Rename `writeN`-like APIs to `createOf`-like in Array modules. |
65 | | -* Rename `new`-like APIs to `emptyOf`-like in Array modules. |
66 | | -* In the Fold module `indexGeneric`, `lengthGeneric`, and `foldlM1'` to |
67 | | - `genericIndex`, `genericLength`, and `foldl1M'` respectively. |
| 10 | +* Added APIs for prompt cleanup of resources, allowing guaranteed |
| 11 | + cleanup as an alternative to GC-based cleanup. |
| 12 | +* Introduced `Streamly.Data.Scanl` with a new `Scanl` type. Scans can |
| 13 | + split a stream into multiple streams, process them independently, and |
| 14 | + merge the results. The `Fold` type is now split into `Fold` and `Scanl`. |
| 15 | +* Added `Streamly.FileSystem.Path` module with a `Path` type for flexibly typed |
| 16 | + file system paths. |
| 17 | +* Added `Streamly.FileSystem.DirIO` and `Streamly.FileSystem.FileIO` to replace |
| 18 | + the deprecated `Streamly.FileSystem.Dir` and `Streamly.FileSystem.File`. The |
| 19 | + new modules use Streamly’s native `Path` type instead of `FilePath`. `DirIO` |
| 20 | + APIs take a `ReadOptions` argument, and its directory read APIs do not follow |
| 21 | + symlinks by default. |
| 22 | +* Removed `Storable` constraint from: |
| 23 | + - `Streamly.Data.Stream.isInfixOf` |
| 24 | + - `Streamly.Data.Array.writeLastN` |
68 | 25 |
|
69 | | -See [0.2.2-0.3.0 API Changelog](/core/docs/ApiChangelogs/0.2.2-0.3.0.txt) for a |
70 | | -full list of deprecations, additions, and changes to the function signatures. |
| 26 | +### Deprecations |
| 27 | + |
| 28 | +Following APIs/modules are deprecated and renamed or replaced with new |
| 29 | +APIs. |
| 30 | +* `Streamly.FileSystem.Dir`, `Streamly.FileSystem.File` have been replaced by |
| 31 | + new modules. |
| 32 | +* Renamed `writeN`-like APIs to `createOf`-like in Array modules. |
| 33 | +* Renamed `new`-like APIs to `emptyOf`-like in Array modules. |
| 34 | +* In the Fold module renamed `indexGeneric`, `lengthGeneric`, and `foldlM1'` to |
| 35 | + `genericIndex`, `genericLength`, and `foldl1M'` respectively. |
71 | 36 |
|
72 | 37 | ### Internal API Changes |
73 | 38 |
|
74 | | -* Functions in internal (mut)array modules now explicitly use |
75 | | - `IO` callback instead of a lifted callback. |
76 | | -* The internal `FileSystem.Event.*` modules have been deprecated in favor of the |
77 | | - [streamly-fsevents](https://github.com/composewell/streamly-fsevents) package. |
78 | | -* Remove the `Storable` constraint from several functions involving the ring |
79 | | - buffer. |
80 | | -* `Streamly.Internal.Data.IORef` is a new module exposing `IORef` and friends. |
| 39 | +* In `Streamly.Internal.Data.Parser`, constructors `Partial`, `Continue`, and |
| 40 | + `Done` are deprecated and replaced with `SPartial`, `SContinue`, and `SDone`. |
| 41 | + Migration steps: |
| 42 | + * In parser step functions: |
| 43 | + - `Partial n` -> `SPartial (1-n)` |
| 44 | + - `Continue n` -> `SContinue (1-n)` |
| 45 | + - `Done n` -> `SDone (1-n)` |
| 46 | + - `Error` -> `SError` |
| 47 | + * Extract function now returns `Parser.Final` (instead of `Parser.Step`): |
| 48 | + - `Continue n` -> `FContinue (-n)` |
| 49 | + - `Done n` -> `FDone (-n)` |
| 50 | + - `Partial n` -> `FContinue (-n)` |
| 51 | + - `Error` -> `FError` |
| 52 | + * If `n` is used for decision-making, the logic must be updated accordingly. |
| 53 | + See docs for details. |
| 54 | +* Internal (mut)array functions now use explicit IO callbacks instead of lifted |
| 55 | + callbacks. |
| 56 | +* Removed `Storable` constraint from several ring buffer functions. |
| 57 | +* Added `Streamly.Internal.Data.IORef` module exposing `IORef` and related |
| 58 | + functions. |
81 | 59 |
|
82 | 60 | ## 0.2.2 (Jan 2024) |
83 | 61 |
|
|
0 commit comments