462d5d9
committed
Commits
Comments (0)
Files changed (2)

+2 2README.md

+7 1src/UnitTyped.hs
README.md
 Ignore whitespace
It comes with all SI units and a large number of units derived from them, but it also makes it very easy to add new dimensions and units. It can give new definitions of *, /, +, , ==, <, <=, > and >= to make notation as natural as possible. To define a new unit, only the multiplication factor (and a string to dispaly it) is required. From just that, all other conversions can be inferred.
+It comes with all SI units and a large number of units derived from them, but it also makes it very easy to add new dimensions and units. It can give new definitions of *, /, +, , ==, <, <=, > and >= to make notation as natural as possible. To define a new unit, only the multiplication factor and a string to display it is required. From just that, all other conversions can be inferred.
While it uses a large number of Haskell extensions, all units and dimensions are empty datatypes, so should not be a burden at runtime.
src/UnitTyped.hs
 Ignore whitespace
(~.) :: (Convertable a b, Convertable c d, Fractional f, UnitEq a c True) => Value f a b > Value f c d > Value f c d
+as :: (Convertable a b, Convertable c d, Fractional f, UnitEq a c True) => Value f a b > Value f c d > Value f c d
(.*.) :: (Fractional f, Convertable a b, Convertable c d, UnitMerge a c u) => Value f a b > Value f c d > Value f u (Mul b d)
(./.) :: (Fractional f, Convertable a b, Convertable c d, UnitMerge a c' u, UnitNeg c c') => Value f a b > Value f c d > Value f u (Div b d)
+(./.), per :: (Fractional f, Convertable a b, Convertable c d, UnitMerge a c' u, UnitNeg c c') => Value f a b > Value f c d > Value f u (Div b d)
(.+.) :: (Fractional f, Convertable a b, Convertable c d, UnitEq c a True) => Value f a b > Value f c d > Value f a b