JSON and CSV encoding for rationals as decimal point numbers. https://github.com/blockscope/flare-timing/tree/master/detour-via-sci#readme
|LTS Haskell 16.3:||[email protected]:1|
|Stackage Nightly 2020-06-16:||[email protected]:1|
|Latest on Hackage:||[email protected]:1|
For encoding and decoding newtype rationals as scientific with a fixed number of decimal places.
Initial version with;
fromScifor converting Rational to and from Scientific.
showScifor showing Rational as if Scientific.
- For JSON, instances of
FromJSONfor newtype Rational that also have instances of
- For CSV, instances of
FromFieldin the same way.
- Template Haskell functions to generate instances.