detour-via-sci

JSON and CSV encoding for rationals as decimal point numbers. https://github.com/blockscope/flare-timing/tree/master/detour-via-sci#readme

Version on this page:1.0.0
LTS Haskell 12.22:1.0.0
Stackage Nightly 2018-12-12:1.0.0
Latest on Hackage:1.0.0

See all snapshots detour-via-sci appears in

MPL-2.0 licensed by Phil de Joux
Maintained by phil.dejoux@blockscope.com

Module documentation for 1.0.0

There are no documented modules for this package.

detour-via-sci

For encoding and decoding newtype rationals as scientific with a fixed number of decimal places.

Changes

1.0.0

Initial version with;

  • toSci and fromSci for converting Rational to and from Scientific.
  • showSci for showing Rational as if Scientific.
  • For JSON, instances of ToJSON and FromJSON for newtype Rational that also have instances of DefaultDecimalPlaces and NewType.
  • For CSV, instances of ToField and FromField in the same way.
  • Template Haskell functions to generate instances.
comments powered byDisqus