Commit Graph

88 Commits

Author SHA1 Message Date
Harendra Kumar
2438be4259 rename the Mem.Array.Stream module to Mem.ArrayStream 2019-08-06 02:55:06 +05:30
Harendra Kumar
e621237b79 update documentation and rename toArray => write
rename toArray/toArrayN to writeF/writeNF to keep the API name consistent with
their regular counterparts. Now the only difference in fold APIs is a suffix F.
2019-08-06 02:28:14 +05:30
Harendra Kumar
a740d4dba9 move stream transformation operations to Prelude 2019-08-03 23:15:26 +05:30
Harendra Kumar
3cdecba40c Create a separate module for "Streams of Arrays" 2019-08-03 08:16:23 +05:30
Harendra Kumar
ea342a40c5 Fix HandleIO example 2019-08-03 05:16:59 +05:30
Harendra Kumar
bba704561b fix warnings, example and readme 2019-08-03 05:16:59 +05:30
Pranay Sashank
8fa60a9fad Fixup, revert changes to examples/FileIOExamples.hs. 2019-07-30 19:27:02 +05:30
Pranay Sashank
ea668dc99b Hide modules not finalised for 0.7.0.
- Hides Pipe, FileSystem.FD, FileSystem.File, Time.Units,
  Time.Clock modules.
- Hides transform function from Fold, Prelude modules.
- Change examples depending on File api, and do not build
  FileIOExamples.
2019-07-30 14:36:18 +05:30
Harendra Kumar
b9dbfaa4f5 rename fileio example to avoid conflict with fileio benchmark 2019-06-18 20:51:21 +05:30
Harendra Kumar
cf2d81091b simplified byte stream versions, remove warnings 2019-06-15 19:01:09 +05:30
Harendra Kumar
dbaacea1c6 implement fromStreamDArraysOf more efficiently
The implementation of fromStreamDArraysOf is now 3x more efficient compared to
the earlier implementation. This makes byte stream level operations almost as
efficient as array level operations.

Other than this the following changes are added in this commit:
* Add insertAfterEach
* Add writeArraysPackedUpto to Handle IO
* Implement `wc -l` example more efficiently using arrays
* Add benchmark for lines/unlines using arrays
* Add tests for splitArraysOn
* Rename some array/file/handle APIs
* Error handling when the group size in grouping operations is 0 or negative
2019-06-15 19:01:09 +05:30
Harendra Kumar
694eab4e6a Raw IO w/o buffering, add some array APIs
* Streamly.FileSystem.FD module for unbuffered IO. Buffering can be controlled
  from the stream itself.
* Support IO using writev as well

Array APIs include:

* coalesceChunksOf to coalesce smaller arrays in a stream into bigger ones
* unlinesArraysBy to join a stream of arrays using a line separator
* splitArraysOn to split a stream of arrays on a separator byte
2019-06-15 19:01:09 +05:30
Pranay Sashank
254f27fde8 Add unlines, unwords, tests for lines/unlines and words/unwords. 2019-06-12 10:30:15 +05:30
Harendra Kumar
d0bba7667b Add toArray fold to fold a stream into a single array 2019-06-02 05:36:02 +05:30
Harendra Kumar
b70a369ccd Add append example 2019-06-01 04:11:57 +05:30
Harendra Kumar
22ccf96a17 Add withSocket, add networking examples to cabal file 2019-05-31 15:01:14 +05:30
Harendra Kumar
81d8c27b31 Add the Network.Client module 2019-05-31 14:06:58 +05:30
Harendra Kumar
a2e76766c3 Split the server combinators in a separate module 2019-05-31 12:43:26 +05:30
Harendra Kumar
fc6d77a025 Fix a performance issue with File.read
We were using bracket on a loop which iterates very frequently. Instead use it
on an outer loop which is much leass frequent.

Also add FileIO.hs to test drive the performance of FileIO APIs.
2019-05-31 09:49:32 +05:30
Harendra Kumar
e19003266d rename FileIO.hs example file to HandleIO.hs 2019-05-31 09:46:53 +05:30
Harendra Kumar
2b120d2445 fix file-io example to use Handle module 2019-05-30 13:10:28 +05:30
Harendra Kumar
75ef6c21c1 sync server example with changes in the library
Use the file API instead of handle API
2019-05-30 12:10:37 +05:30
Harendra Kumar
68690bb4ed update client/server examples 2019-05-29 09:59:05 +05:30
Harendra Kumar
f1e2f03766 update and add networking examples 2019-05-28 10:13:35 +05:30
Harendra Kumar
43a6e751e2 Add socket IO API with examples 2019-05-27 07:03:15 +05:30
Harendra Kumar
25dacda03b Add file-io example 2019-05-22 07:08:34 +05:30
Harendra Kumar
fd7bd713ec Add "Streamly.Fold" module 2019-05-13 12:21:16 +05:30
Harendra Kumar
09fddfa1f3 fix streamK build and examples build 2019-05-04 10:08:09 +05:30
Harendra Kumar
d9b0b79e46 update copyright notice 2019-05-02 15:54:54 +05:30
Mariusz Ryndzionek
7916932416 Removed redundant imports 2019-03-03 13:45:08 +01:00
Harendra Kumar
5fe13b0ef5 update examples and documentation 2018-12-30 22:14:51 +05:30
Harendra Kumar
67600c03b0 Add some convenient runner functions 2018-12-29 16:22:29 +05:30
Harendra Kumar
f6ffd35db8 Do not use exceptions for error handling 2018-12-29 16:22:29 +05:30
Harendra Kumar
114ab1f8cf fix some hlint warnings 2018-10-31 01:53:19 +05:30
Harendra Kumar
165f2a23aa Add control-flow monad transformers' examples 2018-10-26 20:01:28 +05:30
Harendra Kumar
354f7615fa lint free examples 2018-10-13 13:15:22 +05:30
Harendra Kumar
0ef728a55f remove the Quit constructor 2018-10-10 12:39:27 +05:30
Harendra Kumar
482b971ebb make custom rate combinators functions
instead of constructors
2018-08-25 04:51:00 +05:30
Harendra Kumar
aa8345d0d4 Add avg/min/max/const/rate specifications for rate 2018-08-23 06:58:03 +05:30
Harendra Kumar
9c85811905 rename "once" to "yieldM"
and some other related refactoring changes.
2018-06-23 06:50:59 +05:30
Harendra Kumar
328365e5e4 update documentation 2018-06-15 00:44:15 +05:30
Harendra Kumar
54419aa5c3 remove redundant liftIO 2018-05-29 12:51:38 +05:30
Harendra Kumar
21758e09a3 use aheadly in the Listdir example 2018-05-21 06:02:46 +05:30
Harendra Kumar
56cb8e6981 Fix nomenclature in examples 2018-05-13 10:48:18 +05:30
Harendra Kumar
091f4b69fe Add the strictly parallel stream type ParallelT 2018-05-08 07:49:43 +05:30
Harendra Kumar
b214a85407 remove redundant re-exports 2018-05-04 02:04:15 +05:30
Harendra Kumar
c5f97f0e3b Move examples from Streamly module to examples dir 2018-05-04 01:28:02 +05:30
Harendra Kumar
f3dbbde613 move example files 2018-05-04 01:28:02 +05:30
Harendra Kumar
7febfe948d Add consM, once and |:, fixes #51 2018-05-02 15:39:38 +05:30
Harendra Kumar
12b970cdd6 Add stream types specialized to IO monad 2018-04-25 11:31:12 +05:30