MPL-2.0 licensed by Phil de Joux

Module documentation for 1.0.0

This version can be pinned in stack with:detour-via-sci-1.0.0@sha256:b247261ccc6a0865955be5bb87515597c13e1c5dd5e4a8cfe03cbd97dc46b201,2391

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