Commit Graph

2537 Commits

Author SHA1 Message Date
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
e6865109d1 Move the concat benchmark to Unfold module
Remove the NestedUnfoldOps module.
2021-02-20 10:41:58 +05:30
Harendra Kumar
b47918ebcc Add Category and Arrow instances for unfolds 2021-02-20 10:28:43 +05:30
Harendra Kumar
3c428a1139 Fix --help command for run-ci.sh 2021-02-20 09:55:41 +05:30
Harendra Kumar
77d11d37bb Add Monad instance for Unfold 2021-02-20 08:54:28 +05:30
Harendra Kumar
4f9fc7d2c9 Fix duplicate benchmark names
Move the fold benchmarks in stream module to the fold module.
2021-02-20 08:54:28 +05:30
Harendra Kumar
3947fee691 Add Applicative instance for Unfold 2021-02-20 08:51:30 +05:30
Harendra Kumar
1962f8b672 Add a Functor instance for Unfold 2021-02-18 18:22:00 +05:30
Harendra Kumar
1a51cab61a Add a script to run CIs locally using nix/packcheck 2021-02-18 18:18:35 +05:30
Adithya Kumar
521d9cfa7e Add a termination test for wSerialMin 2021-02-18 13:45:40 +05:30
Adithya Kumar
83d00da0f8 Change the single continuation of wSerialMin 2021-02-18 13:45:40 +05:30
Adithya Kumar
7c612fcd84 Bug fix: Serial.wSerialMin 2021-02-18 13:45:40 +05:30
Harendra Kumar
2c70b45660 Implement concatPairswith/sortBy 2021-02-17 17:19:34 +05:30
Harendra Kumar
d0cb8fce84 Add sampling/set/join operations 2021-02-17 16:32:30 +05:30
Harendra Kumar
6739119238 Add some filtering/buffering/insertion combinators
Some of the combinators with trivial implementation are implemented,
others are left unimplemented with signatures for later implementation.
2021-02-17 01:23:51 +05:30
Harendra Kumar
d2d0e16d53 Add a ghc wrapper to invoke ghc on individual files
With all the extensions used in streamly, optimization options and
ddump-simpl options.

This is useful for compiling standalone files, when inspecting core for
perf issues.  I wish cabal could invoke ghc with environment from the
cabal file. Can it?
2021-02-15 15:41:05 +05:30
Adithya Kumar
7500c72e6b Add Fuse annotation ParseD.GroupByState 2021-02-14 22:46:43 +05:30
Adithya Kumar
195606428c Add some nested benchmarks with parseMany 2021-02-14 22:46:43 +05:30
Adithya Kumar
30ea7f1091 Add simplified impl of groupsBy and groupsRollingBy as comments 2021-02-14 22:46:43 +05:30
Adithya Kumar
969f8c0e0a Minor non-functional simplification in sliceSepBy and sliceEndWith 2021-02-14 22:46:43 +05:30
Adithya Kumar
b04187b602 Move parseMany benchamrks from FileSystem.Handle to Data.Parser 2021-02-14 14:37:37 +05:30
Pranay Sashank
9ebca6ec0a Add sequence_ benchmark for ParserD. 2021-02-11 15:01:41 +05:30
Pranay Sashank
c1c77d030e Add benchmark for Data.Fold.concatMap. 2021-02-11 15:01:02 +05:30
Pranay Sashank
039eb7acec Implement Data.Fold.concatMap. 2021-02-11 14:52:10 +05:30
Ranjeet Kumar Ranjan
6976363939 Fix Some minor refactorings of toList/toStream folds #863
Fix refactoring issues in benchmark

Remove redundant import

Address review comments

Revert haddock reference
2021-02-11 00:40:24 +05:30
Harendra Kumar
11831bed44 Rename foldMany and foldMany1
foldMany1 is the default foldMany now. foldMany is renamed to
foldManyPost which is of limited use to split in an infix manner.
2021-02-11 00:37:12 +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
cdccb78b7e Add support for --with-compiler 2021-02-10 19:19:53 +05:30
Harendra Kumar
44b0ff2ac3 Use 0 to initialize IORef instead of undefined
The "undefined" somehow gets evaluated even though it is overwritten
immediately. The benchmarks crash due to this.
2021-02-10 19:01:29 +05:30
Harendra Kumar
6c02648b7d Use fusion-plugin by default 2021-02-10 18:49:58 +05:30
Harendra Kumar
d1ab6e59d6 Rename cabal-build-flags to cabal-build-options 2021-02-10 18:49:58 +05:30
Harendra Kumar
a12febb151 Add sampling support in folds 2021-02-10 03:20:17 +05:30
Harendra Kumar
678ee5e00d Import from lower level modules 2021-02-10 03:20:17 +05:30
Adithya Kumar
27d3575855 Re-implement span, spanBy, and spanByRolling as parsers 2021-02-10 02:11:26 +05:30
Adithya Kumar
de51477471 Add noErrorUnsafeSplitWith 2021-02-10 02:11:26 +05:30
Adithya Kumar
d42276a0c0 Add some common parser idioms using splitWith 2021-02-10 02:11:26 +05:30
Adithya Kumar
c5b6a8bfed Remove span, break, spanBy, and spanByRolling 2021-02-10 02:11:26 +05:30
Adithya Kumar
bf396f0db0 Add fold benchmarks for span, spanBy, and spanByRolling 2021-02-10 02:11:26 +05:30
Adithya Kumar
662aced6cc Add some derived parser benchmarks 2021-02-10 02:11:26 +05:30
Harendra Kumar
1bdfdb551c Update recommendations for new release 2021-02-10 02:04:20 +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
39ec0b6648 Update docs of splitting combinators
Add a template/signature for splitOnPrefix function.
2021-02-09 02:17:41 +05:30
Harendra Kumar
00d3cb5dde Update docs for unlines and unwords 2021-02-09 02:16:03 +05:30
Harendra Kumar
85b69a7afa Edit/Update some docs on folds 2021-02-09 02:16:03 +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
Harendra Kumar
3b37295b29 Move Time/System.hs to Time/Clock/Type.hs 2021-02-08 23:40:35 +05:30
Harendra Kumar
62514f27c1 Factor out the async clock related code 2021-02-08 23:40:35 +05:30
Harendra Kumar
2a522a176e Move "Clock.hsc" to "System.hsc"
The Clock module will host higher level functionality built on lower
level system clock.
2021-02-08 23:40:35 +05:30
Harendra Kumar
c3298c1177 Refactor the "times" function
Factor out the clock creation and reading functions.
2021-02-08 23:40:35 +05:30