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

CopyrightCopyright (C) 2006-2018 Bjorn Buckwalter
LicenseBSD3
Maintainerbjorn@buckwalter.se
StabilityStable
PortabilityGHC only
Safe HaskellNone
LanguageHaskell2010
ExtensionsDataKinds

Numeric.Units.Dimensional.Quantities

Contents

Description

Summary

This module defines type synonyms for common dimensionalities and the associated quantity types. Additional dimensionalities and quantity types will be added on an as-needed basis.

The definitions in this module are grouped so that a type synonym for the dimensionality is defined first in terms of base dimension exponents. Then a type synonym for the corresponding quantity type is defined. If there are several quantity types with the same dimensionality type synonyms are provided for each quantity type.

References

  1. http://physics.nist.gov/Pubs/SP811/
Synopsis

Quantities from the NIST Guide

The following quantities are all from the NIST publication "Guide for the Use of the International System of Units (SI)" [1]. Any chapters, sections or tables referenced are from [1] unless otherwise specified.

For lack of better organization we provide definitions grouped by table in [1].

Table 2

"Examples of SI derived units expressed in terms of SI base units."

Table 3

SI coherent derived units with special names and symbols.

Table 4

"Examples of SI coherent derived units expressed with the aid of SI derived units having special names and symbols."

We use the same grouping as for table 2.

Quantities not from the NIST Guide

Here we define additional quantities on an as-needed basis. We also provide some synonyms that we anticipate will be useful.

Powers of Unit Lengths

It is permissible to express powers of length units by prefixing square and cubic (see section 9.6 "Spelling unit names raised to powers" of [1]).

These definitions may seem slightly out of place but these is no obvious place where they should be. Here they are at least close to the definitions of DArea and DVolume.

square :: (Fractional a, Typeable m) => Unit m DLength a -> Unit NonMetric DArea a Source #

Constructs a unit of area from a unit of length, taking the area of a square whose sides are that length.

>>> 64 *~ square meter == (8 *~ meter) ^ pos2
True

cubic :: (Fractional a, Typeable m) => Unit m DLength a -> Unit NonMetric DVolume a Source #

Constructs a unit of volume from a unit of length, taking the volume of a cube whose sides are that length.

>>> 64 *~ cubic meter == (4 *~ meter) ^ pos3
True

Dimension Aliases

For each Quantity alias supplied above, we also supply a corresponding Dimension alias.

These dimension aliases may be convenient for supplying type signatures for Units or for other type-level dimensional programming.

type DArea = Dim Pos2 Zero Zero Zero Zero Zero Zero Source #

type DVolume = Dim Pos3 Zero Zero Zero Zero Zero Zero Source #

type DVelocity = Dim Pos1 Zero Neg1 Zero Zero Zero Zero Source #

type DAcceleration = Dim Pos1 Zero Neg2 Zero Zero Zero Zero Source #

type DWaveNumber = Dim Neg1 Zero Zero Zero Zero Zero Zero Source #

type DMassDensity = Dim Neg3 Pos1 Zero Zero Zero Zero Zero Source #

type DSpecificVolume = Dim Pos3 Neg1 Zero Zero Zero Zero Zero Source #

type DCurrentDensity = Dim Neg2 Zero Zero Pos1 Zero Zero Zero Source #

type DMagneticFieldStrength = Dim Neg1 Zero Zero Pos1 Zero Zero Zero Source #

type DAmountOfSubstanceConcentration = Dim Neg3 Zero Zero Zero Zero Pos1 Zero Source #

type DLuminance = Dim Neg2 Zero Zero Zero Zero Zero Pos1 Source #

type DFrequency = Dim Zero Zero Neg1 Zero Zero Zero Zero Source #

type DForce = Dim Pos1 Pos1 Neg2 Zero Zero Zero Zero Source #

type DPressure = Dim Neg1 Pos1 Neg2 Zero Zero Zero Zero Source #

type DEnergy = Dim Pos2 Pos1 Neg2 Zero Zero Zero Zero Source #

type DPower = Dim Pos2 Pos1 Neg3 Zero Zero Zero Zero Source #

type DElectricCharge = Dim Zero Zero Pos1 Pos1 Zero Zero Zero Source #

type DElectricPotential = Dim Pos2 Pos1 Neg3 Neg1 Zero Zero Zero Source #

type DCapacitance = Dim Neg2 Neg1 Pos4 Pos2 Zero Zero Zero Source #

type DElectricResistance = Dim Pos2 Pos1 Neg3 Neg2 Zero Zero Zero Source #

type DElectricConductance = Dim Neg2 Neg1 Pos3 Pos2 Zero Zero Zero Source #

type DMagneticFlux = Dim Pos2 Pos1 Neg2 Neg1 Zero Zero Zero Source #

type DMagneticFluxDensity = Dim Zero Pos1 Neg2 Neg1 Zero Zero Zero Source #

type DInductance = Dim Pos2 Pos1 Neg2 Neg2 Zero Zero Zero Source #

type DIlluminance = Dim Neg2 Zero Zero Zero Zero Zero Pos1 Source #

type DAbsorbedDose = Dim Pos2 Zero Neg2 Zero Zero Zero Zero Source #

type DCatalyticActivity = Dim Zero Zero Neg1 Zero Zero Pos1 Zero Source #

type DAngularAcceleration = Dim Zero Zero Neg2 Zero Zero Zero Zero Source #

type DDynamicViscosity = Dim Neg1 Pos1 Neg1 Zero Zero Zero Zero Source #

type DSurfaceTension = Dim Zero Pos1 Neg2 Zero Zero Zero Zero Source #

type DHeatFluxDensity = Dim Zero Pos1 Neg3 Zero Zero Zero Zero Source #

type DHeatCapacity = Dim Pos2 Pos1 Neg2 Zero Neg1 Zero Zero Source #

type DSpecificHeatCapacity = Dim Pos2 Zero Neg2 Zero Neg1 Zero Zero Source #

type DThermalConductivity = Dim Pos1 Pos1 Neg3 Zero Neg1 Zero Zero Source #

type DElectricFieldStrength = Dim Pos1 Pos1 Neg3 Neg1 Zero Zero Zero Source #

type DElectricChargeDensity = Dim Neg3 Zero Pos1 Pos1 Zero Zero Zero Source #

type DElectricFluxDensity = Dim Neg2 Zero Pos1 Pos1 Zero Zero Zero Source #

type DPermittivity = Dim Neg3 Neg1 Pos4 Pos2 Zero Zero Zero Source #

type DPermeability = Dim Pos1 Pos1 Neg2 Neg2 Zero Zero Zero Source #

type DMolarEnergy = Dim Pos2 Pos1 Neg2 Zero Zero Neg1 Zero Source #

type DMolarEntropy = Dim Pos2 Pos1 Neg2 Zero Neg1 Neg1 Zero Source #

type DExposure = Dim Zero Neg1 Pos1 Pos1 Zero Zero Zero Source #

type DAbsorbedDoseRate = Dim Pos2 Zero Neg3 Zero Zero Zero Zero Source #

type DImpulse = Dim Pos1 Pos1 Neg1 Zero Zero Zero Zero Source #

type DMassFlow = Dim Zero Pos1 Neg1 Zero Zero Zero Zero Source #

type DVolumeFlow = Dim Pos3 Zero Neg1 Zero Zero Zero Zero Source #

type DGravitationalParameter = Dim Pos3 Zero Neg2 Zero Zero Zero Zero Source #

type DKinematicViscosity = Dim Pos2 Zero Neg1 Zero Zero Zero Zero Source #

type DFirstMassMoment = Dim Pos1 Pos1 Zero Zero Zero Zero Zero Source #

type DMomentOfInertia = Dim Pos2 Pos1 Zero Zero Zero Zero Zero Source #

type DAngularMomentum = Dim Pos2 Pos1 Neg1 Zero Zero Zero Zero Source #

type DThermalResistivity = Dim Neg1 Neg1 Pos3 Zero Pos1 Zero Zero Source #

type DThermalConductance = Dim Pos2 Pos1 Neg3 Zero Neg1 Zero Zero Source #

type DThermalResistance = Dim Neg2 Neg1 Pos3 Zero Pos1 Zero Zero Source #

type DHeatTransferCoefficient = Dim Zero Pos1 Neg3 Zero Neg1 Zero Zero Source #

type DThermalInsulance = Dim Zero Neg1 Pos3 Zero Pos1 Zero Zero Source #

type DJerk = Dim Pos1 Zero Neg3 Zero Zero Zero Zero Source #