- ➕ Add
UnitFactor, easing type inference in GHC 8.0, thanks to @rimmington.
- ➕ Add
- Compatibility with GHC 8.10, thanks to @ocharles.
- Compatibility with singletons 2.6 and GHC 8.8, further thanks to @ocharles.
- 🛠 Fix some GHC compatibility issues, thanks to @ocharles.
🆕 New interface with the
Readinstances for dimensionless quantities.
NFDatainstances for quantities, thanks to @rimmington.
GHC 8 compatibility.
Data.Metrology.TH.evalTypenow works in GHC 7.10 on dimensions like
Volumeinstead of just base dimensions.
📦 Break out the units parser into its own package:
Data.Metrology.Unsafe.UnsafeQu, which has
Functorand other instances.
🛠 Fix the fixity of
%. It was way too high! Now it's 5.
➕ Add the ability to convert in and out of point quantities. See
quOfPointand friends in
Compatibility with GHC 7.10.
Some types of arithmetic operations are different to aid in type inference. For example,
*|does not normalize its dimension list.
The types of the
derive...TH functions now allow for deriving units based on composite dimensions/units.
🆕 New TH function to help declare constants, called
✅ Includes a decently comprehensive test suite.
➕ Add support for unit parsing within expressions:
g = 9.8 % [si| m/s2 |]
Data.Metrologyexports operators that work with the default LCSU. Use
Data.Metrology.Polyto get the old, more flexible operators.
Data.Metrology.Poly. This allows users to import
Showinstance for quantities.
Numeric operations are available based on vector spaces, as implemented in the
📚 Some documentation cleanup.
🆕 New function
evalTypethat evaluates a type, using Template Haskell. This allows for easier instance declarations for quantities.
🆕 New class
Quantitythat allows for easy conversions with non-
🛠 A few bugfixes.
Ordinstances now work over any quantity, not just dimensionless ones.
🆕 New functions in
Unitinstances for you.
⚡️ This is a major update.
unitsnow supports the notion of a local unit set 👀 and of separable dimensions and units. See the description in the draft paper for more info.
⚡️ This update will very likely break any code that used
⚡️ The update was written in partnership with Takayuki Muranushi.