Copyright | Copyright (C) 2006-2018 Bjorn Buckwalter |
---|---|
License | BSD3 |
Maintainer | bjorn@buckwalter.se |
Stability | Stable |
Portability | GHC only |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
Provides a type level representation of Variant
s of dimensional values,
which may be quantities or units.
Documentation
The kind of variants of dimensional values.
DQuantity ExactPi' | The value is a quantity, stored as an |
DUnit Metricality | The value is a unit, possibly a |
data Metricality Source #
Encodes whether a unit is a metric unit, that is, whether it can be combined with a metric prefix to form a related unit.
type family (v1 :: Variant) * (v2 :: Variant) :: Variant where ... infixl 7 Source #
Forms the product of two Variant
s.
The product of units is a non-metric unit.
The product of quantities is a quantity.
type family Weaken (v :: Variant) :: Variant where ... Source #
Weakens a Variant
by forgetting possibly uninteresting type-level information.
type CompatibleVariants v1 v2 = True ~ AreCompatible v1 v2 Source #
Two Variant
s are compatible when dimensional values of the first may be converted
into the second merely by changing the representation of their values.