Commit Graph

850 Commits

Author SHA1 Message Date
Harendra Kumar
90e9096052 Fix changelog 2019-01-12 19:45:00 +05:30
Harendra Kumar
ffe084ad40 Add ghcjs build to travis CI 2019-01-12 18:25:14 +05:30
Harendra Kumar
34edd618b0 Move time formatting routines in the Time module 2019-01-12 18:25:13 +05:30
Harendra Kumar
06a827f826 Move code and formatting/doc changes 2019-01-11 23:57:50 +05:30
Harendra Kumar
c287e0a146 Support low resolution timers for JS/GHCJS
We filter out the latency data that is below the timer resolution.
2019-01-11 23:23:51 +05:30
Harendra Kumar
108300e0c7 Remove the dependency on the time package
We now have a builtin clock access and time arithmetic
2019-01-11 16:12:59 +05:30
Harendra Kumar
c86b6734f5 Add GHCJS support 2019-01-11 16:04:46 +05:30
Harendra Kumar
cbff63f1cc Put atomic primitives in a separate module
Support atomic primitives (stubs) for ghcjs backend (single processor)
2019-01-11 05:54:28 +05:30
Harendra Kumar
d22a24b12f Replace "clock" with time
Implements convenient conversions between units and uses different
representations for Absolute and Relative time. We depend on "time" only yo get
system time, which too we can replace in future.
2019-01-08 20:07:42 +05:30
Harendra Kumar
84d1b0abf5 fix example links 2019-01-02 12:30:34 +05:30
Harendra Kumar
97035c5c0b Fix GHC-8.6 build
Fix build for ghc-8.0.2

fix sdl install in CI
2018-12-31 02:52:24 +05:30
Harendra Kumar
f44f56ea20 bump version to 0.6.0 2018-12-31 01:05:40 +05:30
Harendra Kumar
62a3af1fc6 disable pure stream test cases 2018-12-31 00:56:57 +05:30
Harendra Kumar
5708ef62e4 update GHC/cabal versions 2018-12-31 00:47:49 +05:30
Harendra Kumar
ebf2cc87ec update new instances in changelog 2018-12-30 23:06:56 +05:30
Harendra Kumar
b324e13cf1 Add recommended build options 2018-12-30 23:06:22 +05:30
Harendra Kumar
5fe13b0ef5 update examples and documentation 2018-12-30 22:14:51 +05:30
Harendra Kumar
d95c8c1218 hide List, String and Enumeration modules
These modules do not yet have a stable API so do not expose them yet.
2018-12-30 22:13:57 +05:30
Harendra Kumar
7d577a469b Add detailed benchmarks for folds
INLINE foldlM'
2018-12-29 21:10:02 +05:30
Harendra Kumar
aaf8d2c45b Fixup after merge with master 2018-12-29 17:24:18 +05:30
Harendra Kumar
9f43f1a33c Add enumerateTo, update documentation 2018-12-29 16:24:26 +05:30
Harendra Kumar
bcd787e710 Move enumeration functions in a separate module 2018-12-29 16:24:26 +05:30
Harendra Kumar
fdf5b290c4 Remove default enumeration ops
as they can't work in all cases
2018-12-29 16:22:29 +05:30
Harendra Kumar
67600c03b0 Add some convenient runner functions 2018-12-29 16:22:29 +05:30
Harendra Kumar
d08c057f8f Add Enumerable type class 2018-12-29 16:22:29 +05:30
Harendra Kumar
bdb59e7262 Update documentation 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
0133e7424f
Merge pull request #151 from composewell/unstream-safe
Make unStream use rstState, making it safer.
2018-12-29 16:20:11 +05:30
Harendra Kumar
d01942d9dd Add applicative benchmarks
Specialize asyncly/wAsyncly/aheadly applicative instances
2018-12-29 15:23:47 +05:30
Harendra Kumar
a4fa2d3974 make some ops INLINE(ABLE)
uncons/zipAsyncWith(M)
2018-12-29 13:39:41 +05:30
Harendra Kumar
25cb5da69b Use rewrite rules to simplify sepcialized code
improved the performance of "drop" operations by 2x
2018-12-29 13:33:36 +05:30
Harendra Kumar
831113b513 recover streamK "drop" performance by using unShare only once
Note that the drop in "mapM" performance in concurrent benchmarks is due to a
benchmark change. We now use the parallel verison of unfoldrM instead of serial
version to generate the stream.
2018-12-28 19:12:00 +05:30
Harendra Kumar
ede29df8d0 specialize the typeclass instances to recover performance 2018-12-28 12:25:52 +05:30
Harendra Kumar
c0420503a1 Fix performance for some ops
especially map/mapM for StreamK and uncons/tail for StreamD
2018-12-27 18:04:45 +05:30
Harendra Kumar
9c8a7504fa Add mapM_ benchmark, add build/augment 2018-12-27 13:59:25 +05:30
Harendra Kumar
a30ef3eef9 Add a nano benchmark for unfoldr, fix dev benchmarks 2018-12-27 00:52:33 +05:30
Harendra Kumar
57fad213a0 Rename the StreamK and StreamD Type modules 2018-12-26 17:07:24 +05:30
Harendra Kumar
c175cddef5 Use bindWith to implement all the binds 2018-12-26 16:59:35 +05:30
Harendra Kumar
0a2755a48c Change the order of foldStream arguments
To make it consistent with regular fold function conventions.
2018-12-26 16:31:38 +05:30
Harendra Kumar
90844f990b Fix a concatMap performance issue 2018-12-26 13:24:24 +05:30
Harendra Kumar
24375dc077 move the callback construction APIs to core module 2018-12-26 13:13:14 +05:30
Harendra Kumar
0258d77a49 clarify foldr and foldl docs 2018-12-26 13:13:14 +05:30
Harendra Kumar
2ba5f01d8c rename unstream et. al. and make them polymorphic
rename:
  unStream to foldStream
  unStreamShared to foldStreamShared
  unStreamSVar to foldStreamSVar

Change the order of arguments to match the standard fold convention.
Make them polymorphic so as to make them more convenient to use without having
to always use fromStream/toStream.

TBD: check performance impact
2018-12-11 20:01:02 +05:30
Harendra Kumar
183325ec73 factor out the StreamK type in a separate file 2018-12-10 23:52:01 +05:30
Harendra Kumar
e08ff863f6 Move the StreamD Type in a separate module 2018-12-10 22:55:08 +05:30
Harendra Kumar
315abcf410 Fix some state sharing/clearing safety issues
1. removed redundant rstState from mergeAsyncBy and mergeByS
2. renamed rstState to adaptState, as it is now used only coerce one state type to
   another.
3. renamed isolateStream to unShare
4. made StreamD as well safer by clearing the SVar sharing during pattern match
2018-12-10 21:18:07 +05:30
Pranay Sashank
769ce84f8f Use unStream with defState, instead of unStreamShared. 2018-12-10 13:19:04 +05:30
Pranay Sashank
c1b1f9224f Fix improper usage of unStream together with rstState. 2018-12-10 13:19:04 +05:30
Pranay Sashank
924856bbbe Make the default unStream safe, #96.
1) Hide the `Stream` constructor, use `mkStream` instead.
2) Change `unStream` to use `rstState`.
3) Use `unStreamShared` to share the `SVar`.
4) Remove `unStreamIsolated`, use `unStream` instead.
5) Change all `unStream m (rstState st)` to `unStream m st`
6) Change all `unStream m st` to `unStreamShared m st`
2018-12-10 13:19:04 +05:30
Pranay Sashank
7c2b9b7c8a Refactor unstreamShared to unStreamShared. 2018-12-10 13:17:11 +05:30