Unit conversion and manipulation library. http://github.com/jdreaver/quantities
|Latest on Hackage:||0.4.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
A library for creating and manipulating physical quantities, which are a numerical value associated with a unit of measurement. Included is an expression parser and a huge list of predefined quantities with which to parse strings into a Quantity datatype. Once created, a quantity can be converted to different units or queried for its dimensionality. A user can also operate on quantities arithmetically, and doing so uses automatic unit conversion and simplification.
- Changed type of
Quantity a, where
ais the type of the magnitude. Note that
ashould be an instance of
Floatingto get the most out of the available operations on quantities.
- Added an executable that is an interface to
- Can use " per " as a synonym for "=>" in
- Added unit conversion to fromString using "x => y"
- Made dimensionality printing nicer.
- Added doctests and doc coverage tests.
- Can handle arithmetical expressions in fromString
- Added support for user-defined definitions
- Added check that definitions are the same for conversions
- Full implementation of multiplicative dimensional quantities (no offsets yet for temperatures).
- Support for conversions and monadic quantity computations.
- Builtin expression parser.
- Simple definitions file format, fully stocked with units.
- Travis CI, HSpec units tests, and HLint check.