Harendra Kumar
eb50b94bd2
Add ability to pass arguments to doctest
...
* Also, use --fast by default
* Add documentation for running doctests in the test README
2021-06-11 02:10:52 +05:30
Pranay Sashank
7d9256e283
Rename Parser.yield, yieldM to fromPure, fromEffect.
2021-05-30 22:24:54 +05:30
Pranay Sashank
f24ddc0bdf
Rename Unfold.yield, yieldM to fromPure, fromEffect.
2021-05-30 22:24:54 +05:30
Harendra Kumar
79defeb5ec
Make minor refactoring changes for fromPure/fromEffect
...
* Move deprecated functions next to original ones, keep them in the generate
section itself.
* Rename constructWithYield to constructWithFromPure
* Fix typo
2021-05-29 14:31:44 +05:30
Pranay Sashank
70faf014ca
Rename Streamly.Prelude.yieldM to fromEffect.
...
- Deprecate yieldM.
2021-05-29 02:05:01 +05:30
Pranay Sashank
4dfc6bf9ee
Rename Streamly.Prelude.yield to fromPure.
...
- Deprecate yield.
2021-05-29 01:22:02 +05:30
Harendra Kumar
03cf686ca7
Export some pre-release array APIs
...
* getIndex
* casting ops
* writeLastN
* readRev
2021-04-27 13:37:56 +05:30
Harendra Kumar
ae1ffbf520
Export forSocketM, rename transformBytesWith
2021-04-24 16:17:39 +05:30
Harendra Kumar
dc647f4a4e
Change the argument order of intercalate and interpose
2021-04-24 16:17:39 +05:30
Ranjeet Kumar Ranjan
ac215ad43f
Rename serially etc. to fromSerial etc. #1029
2021-04-16 00:20:54 +05:30
Ranjeet Kumar Ranjan
f203fa8c5d
Rename fold constructors in Data.Fold #1016
2021-04-12 13:01:24 +05:30
Pranay Sashank
10b03bf59f
Fix tests under dev flag.
2021-04-06 17:11:59 +05:30
Adithya Kumar
d3cc553ef9
Add a test case for Mut.unsafeWriteIndex
2021-04-06 02:34:29 +05:30
Adithya Kumar
833ad1f591
Add a basic array slicing combinator
2021-04-05 23:50:38 +05:30
Harendra Kumar
549d7fd492
Add lifting inner monad section
...
Expose liftInner, runStateT, runReaderT
2021-04-02 21:35:32 +05:30
Adithya Kumar
ac5c311242
Prefix tests with module names
...
Solves https://github.com/composewell/streamly/issues/858
2021-03-31 19:32:42 +05:30
Adithya Kumar
27ccdf4d94
Move compilation memory restrictions under a flag
2021-03-26 16:40:43 +05:30
Harendra Kumar
0954511144
Refactor/rename/add basic unfold constructors
2021-03-24 21:19:18 +05:30
Harendra Kumar
8af1c368c6
Change signatures of zipWith/zipWithM
2021-03-24 20:38:56 +05:30
Harendra Kumar
c5b2ad3740
Refactor/add cross product APIs
2021-03-24 04:00:21 +05:30
Harendra Kumar
a6e8e23062
Make enumerateFromStepNum numerically stable
2021-03-24 03:59:24 +05:30
Harendra Kumar
a5e483b610
Refactor Unfold module
...
* Rearrange exports, export additional functions
* Update docs
* Disable applicative/monad/category/arrow instances
* Rename const to yieldM and add yield
* Remove "effect", it can be expressed by yieldM
* Change order of arguments for some functions
2021-03-24 01:40:30 +05:30
Ranjeet Kumar Ranjan
b73b5ffa3a
Rename concatUnfold to unfoldMany #986
2021-03-22 19:05:17 +05:30
Ranjeet Kumar Ranjan
7759cc0082
Rename Unfold.concat to Unfold.many #985
2021-03-20 00:40:13 +05:30
Pranay Sashank
7650587baa
Implement fold in terms of fold_.
...
- Add test for fold_.
2021-03-18 13:11:23 +05:30
Harendra Kumar
3b1a26cee5
Update Fold module docs and expose some APIs
2021-03-16 01:46:51 +05:30
Adithya Kumar
f261f02d15
Make the behaviour of splitMany similar to that of parseMany
2021-03-13 03:33:17 +05:30
Adithya Kumar
7950a0a967
Add a test case for Fold.many
2021-03-12 01:01:51 +05:30
Ranjeet Kumar Ranjan
87ebad51cb
Rename Types.hs modules to Type.hs
2021-03-11 15:12:08 +05:30
Harendra Kumar
bb72e18365
Remove mkAccum* fold constructors
2021-03-10 19:29:12 +05:30
Ranjeet Kumar Ranjan
4da398aa00
Change argument order in parser combinators #969
...
Keep the collecting fold as the last argument for ease of composition.
Data flows from one fold to the next, so the next fold in the chain
should be the last argument.
2021-03-09 23:10:43 +05:30
Adithya Kumar
eda484641a
Add tests for foldIterateM
2021-03-09 07:56:12 +05:30
Harendra Kumar
ad9308ea6b
Rearrange tests in the same order as in Data.Fold
2021-03-08 22:50:53 +05:30
Harendra Kumar
d2e3430348
Rename some fold combinators
...
This commit has no functional change, only renaming and doc edits.
2021-03-07 23:04:41 +05:30
Ranjeet Kumar Ranjan
df38c4a8a4
Change splitWith to serialWith in folds and parsers
2021-03-05 11:46:59 +05:30
Ranjeet Kumar Ranjan
0414fe8ec6
Rename takeLE to take
2021-03-05 11:43:48 +05:30
Harendra Kumar
ca29fd279e
Make it build for GHC-9.0
2021-03-04 18:25:45 +05:30
Harendra Kumar
c8b9fac92b
Move parse functions to Source module
...
Plus:
* Fix returning buffer in the "parse" function
* Some more minor formatting/doc fixups.
2021-02-21 01:58:20 +05:30
Harendra Kumar
2a7e3ccdbc
Rename the resumable Unfold type to Producer
2021-02-21 01:58:20 +05:30
Harendra Kumar
7c95ccaaad
Use an explicit state to represent nested loops
2021-02-21 01:58:20 +05:30
Harendra Kumar
c93bad0134
Simplify the type of resumable Unfold
2021-02-21 01:58:20 +05:30
Harendra Kumar
22c83f40fd
Add resumable unfolds for efficient nested parsing
...
Instead of using a closed loop we can stop an unfold and then resume it
later. This allows us to break the loop and restart it at some other
point. For example, we can parse a block from an input stream from a
file handle or a socket and then return the socket/handle plus nay
buffered data (due to backtracking) so that we can resume reading from
it later on after doing some processing.
2021-02-21 01:58:20 +05:30
Harendra Kumar
77d11d37bb
Add Monad instance for Unfold
2021-02-20 08:54:28 +05:30
Harendra Kumar
3947fee691
Add Applicative instance for Unfold
2021-02-20 08:51:30 +05:30
Adithya Kumar
521d9cfa7e
Add a termination test for wSerialMin
2021-02-18 13:45:40 +05:30
Harendra Kumar
f6522bdd17
Remove sliceSepByMax
...
It can be expressed as:
sliceSepByMax p n = sliceSepBy p . takeLE n
2021-02-11 00:32:42 +05:30
Harendra Kumar
2131682e9a
Update bin/test.sh cli help, add it to test/README.md
2021-02-10 02:00:33 +05:30
Harendra Kumar
7de5d6d7ff
Allow -Werror without inspection/fusion-plugin
...
We may want to use the -Werror build locally but fusion-plugin takes too
much time to build, so separate the two.
2021-02-09 02:12:48 +05:30
Anurag Hooda
e4e1d25647
make sliceBeginWith fail when first element fails predicate
2021-02-07 20:05:01 +05:30
Anurag Hooda
fb9f05e4fb
Add sliceBeginWith, tests and benchmarks
2021-02-07 20:05:01 +05:30