store
store copied to clipboard
Fast binary serialization in Haskell
I ran hlint on store and found these hints. # Warnings currently triggered by your code ``` - [ ] Avoid lambda, 2 hints - [ ] Eta reduce, 2...
The `Bytes` type in `template-haskell-2.16.0.0` uses derived `Eq` instances, which uses pointer equality, even though it is semantically similar to `ByteString`. This causes the serialization roundtrip tests to fail for...
I think that the `Store` class and `Peek` / `Poke` / `Size` should all have an added type parameter or two which customizes the details of serialization. In particular, it...
Rational numbers can't contain a zero denominator. Smart constructors such as `Data.Ratio.(%)` prevent this, but `store` allows it. ``` Data.Store.decodeEx "\NUL\001\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\000\NUL\NUL\NUL\NUL\NUL\NUL\NUL" :: Rational 1 % 0 > Data.Store.decodeEx "\NUL\000\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\000\NUL\NUL\NUL\NUL\NUL\NUL\NUL" ::...
In Stackage Nightly, testsuite failed with: ``` Finished in 22.9519 seconds 199 examples, 0 failures > /tmp/stackage-build12/store-0.4.3.2$ dist/build/store-weigh/store-weigh store-weigh: Error in case (" 10,000,000 IntMap Int Encode/Decode: Cereal"): ```
Thanks for this awesome library! Are there any plans to remove `hspec` and friends from the library dependencies?
The `Size` type can implement [`Divisible`](https://hackage.haskell.org/package/contravariant-1.4/docs/Data-Functor-Contravariant-Divisible.html): ```haskell instance Divisible Size where divide f = combineSizeWith (fst . f) (snd . f) conquer = ConstSize 0 ``` I think it can...
Should cover: 1) How to derive for your own datatypes 2) Generally how store works and what its features and limitations are (reiteration of README content in Data.Store module)
It's generally reassuring to see these on all the exports, even if it's existed since the first version.
A check was added here to ensure that Map / Set are ascending, disallowing construction of invalid Map / Set. https://github.com/fpco/store/pull/109/files#diff-9ead574b8096a8cfea1c3a95c0f964d1R290 One thing we should do is benchmark whether it's...