Commit Graph

1180 Commits

Author SHA1 Message Date
adithyaov
d3325c60f6 Rename Streamly.Internal.Data.Unicode.Stream
According to the new module structure, it should be Streamly.Internal.Unicode.Stream
2020-09-04 16:55:16 +05:30
adithyaov
b881ed3cd7 Rename Streamly.Internal.Data.Unicode.Char
According to the new module structure, it should be Streamly.Internal.Unicode.Char
2020-09-04 16:55:16 +05:30
Harendra Kumar
bf91f48e95 Add catMaybes, lefts, rights 2020-09-04 08:02:21 +05:30
Harendra Kumar
ad141c695d Add/update stateful map/concat/iterate operations
Add smapM/concatSmapMWith
rename concatMapIterateWith => iterateMapWith
concatMapLoopWith is replaced by iterateSmapMWith
rename concatMapTreeWith => iterateMapLeftsWith
remove concatMapTreeYieldLeavesWith as it can be obtained by using
"rights" on iterateMapLeftsWith
2020-09-04 08:02:21 +05:30
Harendra Kumar
8f00412138 Add better explanatory doc for mfix 2020-09-04 08:02:21 +05:30
Harendra Kumar
6f94a2195e Remove GHC cpp options 2020-09-03 16:31:32 +05:30
Harendra Kumar
683112943c Update documentation 2020-09-03 16:31:32 +05:30
Harendra Kumar
6d6c37ed3c Discover decls in header files using autoconf 2020-09-03 16:31:32 +05:30
Harendra Kumar
f03a4e8f25 Remove the header file ref in ccall ffi
The header file name is insignificant to the compiler and may become outdated
and misleading.
2020-09-03 16:31:32 +05:30
Harendra Kumar
6f350b7a15 Rename Darwin.c to Darwin.m
Apparently Objective C files are named .m, though .c also works fine.
2020-09-03 16:31:32 +05:30
Harendra Kumar
80bcdcfcb3 Replace CApiFFI with ccall
CApiFFI does not seem to be working on macOS 10.15. It seems to be working on
10.12, it was compiling on nix which is using 10.12.

Also, update documentation, rename overflow APIs, use NonEmpty list for paths,
change the Batching timer default to 0.
2020-09-03 16:31:32 +05:30
Harendra Kumar
c10061b390 Implement FS event handling for MacOS 2020-09-03 16:31:32 +05:30
Harendra Kumar
adc550beda Add Data.Cont module for continuations 2020-09-03 15:25:16 +05:30
Harendra Kumar
a306a9ef2c Call all continuations when extracting
When extracting the parser value in fromParserK we need to continue
calling the continuations and extracting until the parser finishes.
2020-09-03 12:33:24 +05:30
Harendra Kumar
6a6be9dfca Initialize parser only if the stream is not empty
In parseMany on the next parse if we find that the stream has ended then
the parse may fail on extraction, so we initialize the parser only if
we see at least one element in the stream.
2020-09-03 12:33:24 +05:30
Harendra Kumar
fbb1c8492e Fix a bug in ParserK yield operation
We should not increment the leftover count.
2020-09-03 12:33:24 +05:30
Harendra Kumar
eff325538e Add docs and asserts for fromParserK
Added a Control.Exception module providing "assert" and "verify" convenience
utilities.
2020-09-03 12:33:24 +05:30
Harendra Kumar
c3dcabc1a9 Add instances and parseMany tests for ParserD 2020-09-03 12:33:24 +05:30
Harendra Kumar
c8203713ed Use NonEmpty argument 2020-09-03 07:32:32 +05:30
Harendra Kumar
3cdc73c157 Implement handleToFd for GHC 8.0 2020-09-03 07:32:32 +05:30
Harendra Kumar
9fd6f72303 Use inotify flags only if the kernel supports them 2020-09-03 07:32:32 +05:30
Harendra Kumar
87700f6aca Add FS event handling (inotify) module for Linux 2020-09-03 07:32:32 +05:30
Ahmed Zaheer Dadarkar
a84e6cf1db Uncomment failing tests with few changes 2020-09-01 11:27:11 +05:30
adithyaov
b02925aa17 Capture inner monad state and associate it with the work for ahead 2020-08-29 04:13:10 +05:30
adithyaov
503e289482 Capture inner monad state and associate it with the work for async 2020-08-29 04:13:10 +05:30
adithyaov
18becf54c1 Move Memory/Malloc.hs to the Internal directory and expose it
Move it to Internal.Foreign.Malloc
2020-08-29 01:25:47 +05:30
adithyaov
9ccf93168b Provide a flag to use the C malloc instead of the default GHC malloc 2020-08-29 01:25:47 +05:30
Harendra Kumar
02f7ce0714 Fix since annotations of exception routines 2020-08-28 08:10:00 +05:30
Harendra Kumar
6d88edd6d3 Fix atomicity issue when clearing finalizer
In gbracket.
2020-08-27 00:19:31 +05:30
Harendra Kumar
a54a1ae9d2 Fix atomicity issue when running a finalizer
The clearing of finalizer from GC hook and running the finalizing action must
be atomic wrt async exceptions.
2020-08-27 00:19:31 +05:30
Harendra Kumar
bd7c518b6a Refactor the finalizer routines
For better modularity and clarity.
2020-08-27 00:19:31 +05:30
pranaysashank
1e5192145b Rename Internal.Mutable.Prim.Var to Internal.Data.IORef.Prim.
- Rename function fromPrimVar to fromPrimIORef.
2020-08-26 13:41:27 +05:30
Pranay Sashank
971da77528 Refactor gbracket, Add ghandle to retry the stream on exception. 2020-08-25 16:09:58 +05:30
pranaysashank
c8c161c34b Rename module Internal.Prelude to Internal.Data.Stream.IsStream. 2020-08-24 00:29:25 +05:30
pranaysashank
bf3780f65a Add encodeUtf8Lax. 2020-08-23 12:24:31 +05:30
Pranay Sashank
960def155f Make the finalizer based exception handling routines the default.
- Change the handlers for both streams and unfolds.
2020-08-23 11:50:59 +05:30
Harendra Kumar
1944ba0f17 Remove the Zipper module 2020-08-23 02:08:34 +05:30
Harendra Kumar
9e38d4a84e Simplify ParserK by using backtracking of ParserD
Remove the use of Zipper type, we now directly communicate with the parser
driver using the ParserD interface to backtrack in the input buffer.
2020-08-23 02:08:34 +05:30
Pranay Sashank
0a8d13d746 Make polymorphic semigroup ops wSerial, etc same fixity as <>.
- Update Changelog to reflect the change.
2020-08-22 13:03:25 +05:30
Harendra Kumar
944f57dcf4 Add some chunked file read APIs
* readChunks
* readChunksWithBufferOf
* readWithBufferOf
2020-08-21 02:54:21 +05:30
Harendra Kumar
83071813f5 Improve error handling in decodeUtf8 2020-08-21 02:32:42 +05:30
Harendra Kumar
1639cfde98 Use monadic action to get the initial state
In ReaderT/StateT evaluation.
2020-08-19 19:41:08 +05:30
Harendra Kumar
d162e6d7ce Rename, update docs of array casting routines 2020-08-15 20:26:23 +05:30
Harendra Kumar
cc072be34d Rename, update docs of array creation from ptr
Rename fromString to fromCString to avoid confusion. fromString sounds like it
creates an array of Char from a list of Char. CString is more precise
definition of a nul terminated byte string.

Also, add fromPtr to create an array from a pointer type.
2020-08-15 20:26:16 +05:30
adithyaov
ead1601148 Replace Data.Strict with Data.*.Strict
"Streamly.Internal.Data.Strict" is replaced by:
Streamly.Internal.Data.Tuple.Strict
Streamly.Internal.Data.Maybe.Strict
Streamly.Internal.Data.Either.Strict

This commit also has some formatting changes to imports.
2020-08-14 20:25:52 +05:30
Harendra Kumar
ecef82f2aa Remove redundant import 2020-08-14 18:37:22 +05:30
Harendra Kumar
6b856286fa Add word64host 2020-08-14 18:37:22 +05:30
Harendra Kumar
a98d897359 Add routines to cast the array into other types 2020-08-14 18:37:22 +05:30
Harendra Kumar
0f5404dfc6 Add Word16 LE, Word32 and Word64 parsers 2020-08-14 16:29:58 +05:30
Harendra Kumar
8a3828ad7d Add parsers for decoding binary encoded data 2020-08-14 16:29:58 +05:30