Copyright | Copyright (C) 2006-2018 Bjorn Buckwalter |
---|---|
License | BSD3 |
Maintainer | [email protected] |
Stability | Stable |
Portability | GHC only |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions |
|
Numeric.Units.Dimensional.Variants
Description
Provides a type level representation of Variant
s of dimensional values,
which may be quantities or units.
Synopsis
Documentation
The kind of variants of dimensional values.
Constructors
DQuantity ExactPi' | The value is a quantity, stored as an |
DUnit Metricality | The value is a unit, possibly a |
Instances
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.
Constructors
Metric | Capable of receiving a metric prefix. |
NonMetric | Incapable of receiving a metric prefix. |
Instances
Data Metricality Source # | |||||
Defined in Numeric.Units.Dimensional.Variants Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Metricality -> c Metricality # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Metricality # toConstr :: Metricality -> Constr # dataTypeOf :: Metricality -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Metricality) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Metricality) # gmapT :: (forall b. Data b => b -> b) -> Metricality -> Metricality # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Metricality -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Metricality -> r # gmapQ :: (forall d. Data d => d -> u) -> Metricality -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Metricality -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Metricality -> m Metricality # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Metricality -> m Metricality # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Metricality -> m Metricality # | |||||
Generic Metricality Source # | |||||
Defined in Numeric.Units.Dimensional.Variants Associated Types
| |||||
NFData Metricality Source # | |||||
Defined in Numeric.Units.Dimensional.Variants Methods rnf :: Metricality -> () # | |||||
Eq Metricality Source # | |||||
Defined in Numeric.Units.Dimensional.Variants | |||||
Ord Metricality Source # | |||||
Defined in Numeric.Units.Dimensional.Variants Methods compare :: Metricality -> Metricality -> Ordering # (<) :: Metricality -> Metricality -> Bool # (<=) :: Metricality -> Metricality -> Bool # (>) :: Metricality -> Metricality -> Bool # (>=) :: Metricality -> Metricality -> Bool # max :: Metricality -> Metricality -> Metricality # min :: Metricality -> Metricality -> Metricality # | |||||
type Rep Metricality Source # | |||||
Defined in Numeric.Units.Dimensional.Variants |
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 (v1 :: Variant) / (v2 :: Variant) :: Variant where ... Source #
Forms the quotient of two Variant
s.
The quotient of units is a non-metric unit.
The quotient of quantities is a quantity.