units v2.1 Release Notes
-
✅ Includes a decently comprehensive test suite.
➕ Add support for unit parsing within expressions:
g = 9.8 % [si| m/s2 |]
See
Data.Metrology.Parser
.0️⃣ Now,
Data.Metrology
exports operators that work with the default LCSU. UseData.Metrology.Poly
to get the old, more flexible operators.🚚 Moved
showIn
fromData.Metrology.Show
toData.Metrology.Poly
. This allows users to importshowIn
without aShow
instance for quantities.Numeric operations are available based on vector spaces, as implemented in the
vector-space
library. SeeData.Metrology.Vector
.📚 Some documentation cleanup.
🆕 New function
evalType
that evaluates a type, using Template Haskell. This allows for easier instance declarations for quantities.🆕 New class
Quantity
that allows for easy conversions with non-units
types.🛠 A few bugfixes.
The
Eq
andOrd
instances now work over any quantity, not just dimensionless ones.🆕 New functions in
Data.Metrology.TH
that defineDimension
andUnit
instances for you.