The update to numtype also necessitated an update to dimensional, mainly to bump the upper bounds of the numtype dependency, but a few API additions snuck in too. The change log for the new version (0.12.3), as well as the other versions that have been uploaded to hackage since my previous version announcement can be found at the bottom of this post.
Dimensional-tf didn’t need an update for GHC 7.8 but has been updated with the same API additions as dimensional.
- Bump numtype dependency to 1.1 (GHC 7.8.1 compatibility fix).
- Added D.. for the type synonym quantities (e.g.,
- Improved unit numerics.
- Typeable Dimensionals.
_0(closes issue 39).
- Added imperial volume units.
- Added ‘mil’ (=inch/1000).
- Bumped time dependency to < 1.5.
- Bumped time dependency to < 1.4.
GHC 7.2.1 compatibility fix:
- Increased CGS context-stack to 30.
> y = (-41940.917505092) *~ kilo meter
With NegativeLiterals users of dimensional can finally write:
> y = -41940.917505092 *~ kilo meter
Thanks GHC HQ and contributors!
However, be careful so the extension doesn’t break your calculations. Here is an example (not using dimensional) of how you could get bitten. Without NegativeLiterals:
> Prelude> -2 ^ 2 > -4
> Prelude> -2 ^ 2 > 4
I certainly prefer the latter behaviour, but having some regression tests in place when enabling NegativeLiterals might be a good idea.