dimensional-1.0.1.1: Statically checked physical dimensions, using Type Families and Data Kinds.

CopyrightCopyright (C) 2006-2015 Bjorn Buckwalter
LicenseBSD3
Maintainerbjorn@buckwalter.se
StabilityStable
PortabilityGHC only
Safe HaskellSafe
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • TypeFamilies
  • DataKinds
  • DeriveDataTypeable
  • AutoDeriveTypeable
  • DeriveGeneric
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces

Numeric.Units.Dimensional.Variants

Description

Provides a type level representation of Variants of dimensional values, which may be quantities or units.

Synopsis

Documentation

data Variant Source

The kind of variants of dimensional values.

Constructors

DQuantity

The value is a quantity.

DUnit Metricality

The value is a unit, possibly a Metric unit.

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.

type family v1 * v2 :: Variant 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 Weaken v :: Variant Source

Weakens a Variant by forgetting possibly uninteresting type-level information.