| Copyright | Copyright (C) 2006-2018 Bjorn Buckwalter |
|---|---|
| License | BSD3 |
| Maintainer | bjorn@buckwalter.se |
| Stability | Stable |
| Portability | GHC only |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
| Extensions |
|
Numeric.Units.Dimensional.Variants
Description
Provides a type level representation of Variants of dimensional values,
which may be quantities or units.
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
| Generic Variant Source # | |
| type Rep Variant Source # | |
Defined in Numeric.Units.Dimensional.Variants type Rep Variant = D1 ('MetaData "Variant" "Numeric.Units.Dimensional.Variants" "dimensional-1.6.1-ELRyWwWitPHC8LaQvCwLfc" 'False) (C1 ('MetaCons "DQuantity" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ExactPi')) :+: C1 ('MetaCons "DUnit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Metricality))) | |
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
type family (v1 :: Variant) * (v2 :: Variant) :: Variant where ... infixl 7 Source #
Forms the product of two Variants.
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 Variants.
The quotient of units is a non-metric unit.
The quotient of quantities is a quantity.