Commit Graph

778 Commits

Author SHA1 Message Date
Harendra Kumar
dfa2079542 Move Stream.Chunked to Array.Stream 2023-11-24 12:37:42 +05:30
Harendra Kumar
33bffd614b Change deriveUnbox to use instance splice 2023-11-22 21:39:39 +05:30
Harendra Kumar
1640a686e7 Rename Config/defaultConfig to S/serializeConfig 2023-11-22 21:39:39 +05:30
Harendra Kumar
7d50e5e03e Implement deriveSerialize using deriveSerializeWith 2023-11-22 21:39:39 +05:30
Harendra Kumar
e7f6e7e9eb Add Config setter functions for Serialize derivation 2023-11-22 21:39:39 +05:30
Harendra Kumar
97e0d20ffb Re-export internal serialize modules and hide them 2023-11-21 02:37:28 +05:30
Harendra Kumar
621cb65f50 Move ToBytes and FromBytes under Data.Serialize 2023-11-20 17:43:55 +05:30
Harendra Kumar
32390c592e Add a finalizer action in Fold type
This was needed especially for concurrent fold combinators. A fold
combinator that uses concurrent folds needs to wait for the concurrent
folds to finish before it can finish. The finalizing action in folds can
deallocate any resources allocated by the "initial" action and also wait
for folds that it has initialized.

This complicates fold combinators in general. We can potentially
introduce a type for non-failing parsers and support finalization only
in those. The current use cases can be covered by that. Parsers do not
support scanning, which is not required in the use cases where we need
finalization (there is no known use case).
2023-11-18 23:51:09 +05:30
Harendra Kumar
a11fe00965 Fix warnings for GHC 9.6 and 9.8 2023-11-03 01:44:25 +05:30
Harendra Kumar
104bfc3a3f Update dependency versions 2023-10-31 13:32:39 +05:30
Adithya Kumar
8e04e4b988 Add Serialize instance for tuple 2023-10-01 12:55:11 +05:30
Adithya Kumar
bd8c8cb1b8 Add tests for TH derivation with recordSyntaxWithHeader is enabled
- Add roundtrip tests for nested records
- Add compatibility tests
2023-09-27 08:18:14 +05:30
Adithya Kumar
60a71dcbb5 Use more expressive notation for deriveSerializeWith 2023-09-14 22:20:59 +05:30
Adithya Kumar
4f00d1f54a Split the Serialize.roundtrip test into reusable parts 2023-09-14 17:41:21 +05:30
Adithya Kumar
5f67528761 Add a more robust offset ignoring tests in Serialize
This is meant to catch any serialized absolute offsets
2023-09-14 17:41:21 +05:30
Adithya Kumar
5ba608affc Update the Scientific tests in Unicode.Parser 2023-09-12 01:00:29 +05:30
Adithya Kumar
9c67608ffa Add Serialize instance for Integer 2023-09-12 01:00:29 +05:30
Adithya Kumar
3043a3f699 Add Serialize instance for (Array a) 2023-09-12 01:00:29 +05:30
Adithya Kumar
b675912c27 Test the encoding and decoding functions in the roundtrip 2023-09-12 01:00:29 +05:30
Adithya Kumar
21fd670143 Add tests for the constructorTagAsString option in Serialize.TH 2023-09-12 01:00:29 +05:30
Adithya Kumar
13f91aad8c Change the API and update doc of a few APIs in Serialize.TH 2023-09-06 15:09:08 +05:30
Adithya Kumar
9f7b45dcf4 Use a configuration to control functionality of deriveSerializeWith 2023-09-06 15:09:08 +05:30
Adithya Kumar
9479709551 Add Serialize test for datatype with functional parameters 2023-09-01 08:01:58 +05:30
Adithya Kumar
5381715f97 Change the functionality of deriveSerailizeWith 2023-09-01 08:01:58 +05:30
Adithya Kumar
50fc60cb50 Add serialize size checks for constant size datatypes 2023-08-30 14:07:33 +05:30
Adithya Kumar
1d0e20c9d3 Add a test checking the size in the roundtrip serialization tests 2023-08-30 14:07:33 +05:30
Adithya Kumar
5fef84310e Remove Serailize.Size and change the signature of Serialize.size 2023-08-30 14:07:33 +05:30
Harendra Kumar
7bc450d725 Pass the array size to deserialize for bound check 2023-08-21 16:28:02 +05:30
Harendra Kumar
f7f42e0242 Improve "size" op performance in Serialize
By using tail-recursive traversal of the structures.
2023-08-21 01:45:06 +05:30
Adithya Kumar
2e53b60161 Increase memory for limit-build-mem on the Serialize test-suite 2023-08-18 23:07:50 +05:30
Adithya Kumar
041be85bb8 Limit number of tests in large quick check properties 2023-08-18 23:07:50 +05:30
Adithya Kumar
4997b47fe1 Add a recursive ADT to the Serialize test-suite 2023-08-18 23:07:50 +05:30
Adithya Kumar
c4343a47f7 Abstact size and simplify the CPP statement in Unbox tests 2023-08-18 23:07:50 +05:30
Adithya Kumar
dbf9fe89f1 Add common Serialize deriving tests 2023-08-18 23:07:50 +05:30
Adithya Kumar
c4794aab93 Add tests for the Serialize template haskell deriving 2023-08-18 23:07:50 +05:30
Ranjeet Ranjan
2e8c9ac1fd
Rename unsafeIndex in Array module to getIndexUnsafe (#2540) 2023-08-18 15:44:47 +05:30
Ranjeet Ranjan
e6051b17cc
Re-export entire submodules from Producer (#2514) 2023-08-11 15:14:25 +05:30
Ranjeet Ranjan
c256c3223e
Re-export entire submodules from MutArray (#2509) 2023-08-11 14:58:40 +05:30
Ranjeet Ranjan
96eebafafe Add window prefix to combinators in Fold.Window module (#2517) 2023-08-11 10:17:59 +05:30
Ranjeet Ranjan
8b55b1a03e
Re-export entire submodules from Array (#2510) 2023-08-11 10:15:51 +05:30
Ranjeet Kumar Ranjan
cd523f5177 Move Data.Ring.Unboxed to Data.Ring 2023-08-10 13:40:05 +05:30
Ranjeet Ranjan
be2b3d1bdc
Re-export entire submodules from Streamly.Internal.Data.Fold (#2505)
Co-authored-by: Harendra Kumar <harendra@composewell.com>
2023-08-09 23:08:10 +05:30
Ranjeet Kumar Ranjan
d304fb842a Hide Internal StreamD submodules 2023-08-03 17:47:07 +05:30
Adithya Kumar
88448b6b77 Add common TH derived tests similar to the Generic derived tests 2023-08-03 13:31:45 +05:30
Adithya Kumar
63407dc47d Add a template haskell test suite 2023-08-03 13:31:45 +05:30
Adithya Kumar
2241afafb6 Abstract the Unbox deriving process in Unbox tests 2023-08-03 13:31:45 +05:30
Adithya Kumar
1339893885 Move the Serialize tests into its own module 2023-08-03 13:31:45 +05:30
Ranjeet Ranjan
9bf458f682
Merge Data.Parser.ParserD test cases to Data.Parser (#2458)
Co-authored-by: Harendra Kumar <harendra@composewell.com>
2023-08-02 15:54:24 +05:30
Ranjeet Ranjan
3fb676b98b
Correct Internal Array module names (#2478) 2023-07-29 00:00:34 +05:30
Harendra Kumar
b085507aec Add a faster, custom impl of double parser 2023-07-28 18:12:19 +05:30
Adithya Kumar
df5d1518d3 Non-Functional renaming changes in the array APIs
- Add pinned version of chunksOf
- Add documentation to pinned combinators
- Use the combinators with "pinned*" prefix over "*As" suffix
- Reduce the use of PinnedState
2023-07-28 00:51:14 +05:30
Adithya Kumar
3a3436c393 Use the pinned prefix over pinned suffix in array combinators
- Remove withNewArrayUnsafePinned (asPtrUnsafe can be used)
- Deprecate newPinned
2023-07-28 00:51:14 +05:30
Ranjeet Kumar Ranjan
aaa11613b2 Use non-threaded runtime for network tests on windows 2023-07-27 18:12:07 +05:30
Ranjeet Kumar Ranjan
efe0be398c Add benchmarks and property test for double Parser 2023-07-26 17:37:05 +05:30
Adithya Kumar
58b86c5281 Add a typeclass for serializing variable length types 2023-07-25 17:00:50 +05:30
Ranjeet Ranjan
eea1e0f634
Use all config options in Data.Stream.Concurrent tests (#1928)
Co-authored-by: Harendra Kumar <harendra@composewell.com>
2023-07-25 15:29:21 +05:30
Ranjeet Ranjan
afcc8ea59f
Implement double Parser (#2278)
Co-authored-by: Harendra Kumar <harendra@composewell.com>
Co-authored-by: Adithya Kumar <adithya@composewell.com>
2023-07-24 18:34:01 +05:30
Ranjeet Kumar Ranjan
69aa279c6c Import Data.Stream instead of Data.Stream.StreamD 2023-07-22 23:00:40 +05:30
Harendra Kumar
5e0307ae79 Import Parser instead of ParserD 2023-07-22 21:52:02 +05:30
Adithya Kumar
6a4d26b170 Rename Internal.Data.Unboxed to Internal.Data.Unbox 2023-07-20 16:54:29 +05:30
Ranjeet Ranjan
1ab2878eca
Expose groupsOf from Data.Stream (#2372) 2023-07-04 23:07:43 +05:30
Harendra Kumar
4ccd51c2b8 Remove MonadTrans/MonadBase instances for GHC >= 9.6
Remove MonadTrans/MonadBase instances for:

* ParallelT
* AsyncT
* WAsyncT
* AheadT

To accommodate a breaking change in transformers-0.6 .
2023-06-30 14:45:58 +05:30
Ranjeet Ranjan
8d7b837109 Build streamly with ghc-9.6.1 2023-06-29 08:41:03 +05:30
Ranjeet Kumar Ranjan
f1b5a212c5 Disable Linux event test using dev flag 2023-04-23 19:44:38 +05:30
Harendra Kumar
90b8467567 Fix build for concurrent stream test 2023-03-12 23:05:05 +05:30
Harendra Kumar
3cf59a6024 Disable some failing FileSystem.Event.Linux test cases 2023-03-11 20:30:25 +05:30
Harendra Kumar
8fe249da3b Fix new GHC warning 2023-03-10 23:22:12 +05:30
Ranjeet Ranjan
5946791774
Disable Windows hanging test cases (#2314) 2023-03-08 00:55:13 +05:30
Adithya Kumar
b5c79693fb Rename arraysOf to chunksOf 2023-03-06 17:19:25 +05:30
Ranjeet Kumar Ranjan
8240f5f870 Add multiple tests for the Unboxed typeclass
* Test for serialization
* Test for consistency with Generic deriving
2023-03-03 19:28:15 +05:30
Ranjeet Kumar Ranjan
5c9430a0ae Add test cases for Streamly.Internal.Serialize module 2023-03-02 17:11:14 +05:30
Harendra Kumar
d134ea3a56 Disable deintercalate tests 2023-03-02 16:22:32 +05:30
Harendra Kumar
635489ba7b Fix escape processing in wordWithQuotes
To escape characters in the same way as shell and to be able to specify
escape transliteration, and transliterate based on the type of quote.
2023-03-02 16:22:32 +05:30
Ranjeet Ranjan
34b2b49876
Rename mutable array type to MutArray (#2272) 2023-03-02 09:40:20 +05:30
Harendra Kumar
2d18f9eebd Expose decodeUtf8Chunks
Rename decodeUtf8Arrays* to decodeUtf8Chunks* to make it consistent with
other chunked stream operation names.
2023-03-01 23:09:38 +05:30
Harendra Kumar
5a81623427 Remove the chunked parser modules 2023-02-16 10:35:26 +05:30
Harendra Kumar
36bbd3bc1c Remove the rewrite rule based Parser wrapper layer
Now we have explicit "Parser" and "ParserK" types for direct style and
CPS parsers, respectively. The programmer can use either type depending
on the use case.
2023-02-10 11:48:18 +05:30
Ranjeet Kumar Ranjan
8629a0e806 Fix test cases for StreamD/StreamK split up 2023-02-06 22:09:46 +05:30
Harendra Kumar
dabe66ceaa Fix test and benchmarks for concurrent module changes 2023-01-13 16:44:36 +05:30
Harendra Kumar
3c3ec6de48 Make minor refactor/cleanup changes to array code
* Use defaultChunkSize in tests from Streamly.Internal.System.IO module
2023-01-10 23:45:41 +05:30
Adithya Kumar
96a7c99708 Use Proxy type in the sizeOf method of Unbox 2023-01-09 13:05:06 +05:30
Ranjeet Ranjan
deb16f8670
Add test cases for Unbox Generic derived instances (#2207)
Co-authored-by: Harendra Kumar <harendra@composewell.com>
2023-01-07 19:05:30 +05:30
Ranjeet Ranjan
030499eb7e
Fix dev flag build, test, benchmarks issues (#2206)
* Fix dev flag build, test, benchmarks issues
* Add no-charts flag when compiling bench-report

Co-authored-by: Harendra Kumar <harendra@composewell.com>
2023-01-07 14:32:31 +05:30
Adithya Kumar
f7f264fefd Remove Storable constraint from Unbox typeclass 2023-01-06 00:14:45 +05:30
Harendra Kumar
133e20addb Fix test targets and heap for generic array 2022-12-30 19:03:28 +05:30
Harendra Kumar
94f3134643 Change the argument order of put/modifyIndex 2022-12-30 19:03:28 +05:30
Harendra Kumar
6ca9d80006 Refactor Fold.Container and expose some container ops
Make the container operations less polymorphic.
2022-12-28 17:21:48 +05:30
Ranjeet Kumar Ranjan
666eb07493 Rename ParserChunked to ChunkParser 2022-12-11 00:31:29 +05:30
Ranjeet Ranjan
45e21892bc
Rename unicode internal modules (#2164) 2022-12-11 00:23:43 +05:30
Harendra Kumar
10b1ac12a9
Use Either result in parse ops in Chunked stream/Producer (#2145)
Co-authored-by: Ranjeet Kumar Ranjan <ranjeetr@composewell.com>
2022-12-06 16:52:56 +05:30
Ranjeet Ranjan
001b874234
Rename rights, lefts, both to catRights, catLefts, catEithers (#2139)
Co-authored-by: Harendra Kumar <harendra@composewell.com>
2022-12-01 16:28:37 +05:30
Ranjeet Kumar Ranjan
3a21b44607 Make parser result type either everywhere
* Change remaining parse/parseBreak/parseIterate functions
* Fix benchmarks
* Fix tests
2022-11-25 19:09:34 +05:30
Harendra Kumar
8c8b9c34ee Remove the Monad instance from SerialT/Stream type
Transfer the removed instances to the CrossStream type.
2022-11-20 17:20:06 +05:30
Harendra Kumar
4f862664f9 Improve performance of the chunked parser
Pass around the original unchanged array instead of reconstructing the
array every time the bounds change.

Remove the specialized handling of the Alternative case.
2022-11-17 16:49:25 +05:30
Harendra Kumar
fe28607c9e Add a chunked parser implementation 2022-11-17 16:49:25 +05:30
Harendra Kumar
d7d4613a27 Prefix par to concurrent APIs
So that we can import these along with the normal/serial streaming APIs
and distinguish them clearly.
2022-11-17 11:57:03 +05:30
Ranjeet Kumar Ranjan
297574d7f1 Rename Array.Stream module to Stream.Chunked 2022-11-15 15:18:38 +05:30
Adithya Kumar
5a9eab8528 Rename append(N) to writeAppend(N) in unboxed arrays 2022-11-07 19:11:45 +05:30
Adithya Kumar
0d3c63aeae Rename serialWith to splitWith 2022-11-07 19:11:27 +05:30
Ranjeet Kumar Ranjan
4eda9d0c1f Rename Data.Array.Unboxed 2022-11-04 16:00:48 +05:30