Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module exports unit definitions according to the SI system of units. The definitions were taken from here: http://www.bipm.org/en/si/.
Some additional units were added based on this link: "Non-SI units accepted for use with the SI, and units based on fundamental constants".
There is one deviation from the definitions at that site: To work better
with prefixes, the unit of mass is Gram
.
This module exports both American spellings and British spellings of units, using pattern synonyms to get the British spellings of data constructors.
Synopsis
- data Meter = Meter
- type Metre = Meter
- pattern Metre :: Metre
- data Gram = Gram
- type Gramme = Gram
- pattern Gramme :: Gramme
- data Second = Second
- data Minute = Minute
- data Hour = Hour
- data Ampere = Ampere
- data Kelvin = Kelvin
- data Mole = Mole
- data Candela = Candela
- data Radian = Radian
- data Steradian = Steradian
- data Hertz = Hertz
- data Liter = Liter
- type Litre = Liter
- pattern Litre :: Litre
- data Newton = Newton
- data Pascal = Pascal
- data Joule = Joule
- data Watt = Watt
- data Coulomb = Coulomb
- data Volt = Volt
- data Farad = Farad
- data Ohm = Ohm
- data Siemens = Siemens
- data Weber = Weber
- data Tesla = Tesla
- data Henry = Henry
- data Lumen = Lumen
- data Lux = Lux
- data Becquerel = Becquerel
- data Gray = Gray
- data Sievert = Sievert
- data Katal = Katal
- data Degree = Degree
- data Arcminute = Arcminute
- data Arcsecond = Arcsecond
- data Hectare = Hectare
- data Ton = Ton
- type Tonne = Ton
- pattern Tonne :: Tonne
- siUnits :: [Name]
Documentation
Instances
Show Meter Source # | |
Unit Meter Source # | |
type UnitFactorsOf Meter Source # | |
Defined in Data.Units.SI type UnitFactorsOf Meter = If (IsCanonical Meter) (F Meter One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Meter)) | |
type DimOfUnit Meter Source # | |
Defined in Data.Units.SI | |
type BaseUnit Meter Source # | |
Defined in Data.Units.SI |
Instances
Show Gram Source # | |
Unit Gram Source # | |
type UnitFactorsOf Gram Source # | |
Defined in Data.Units.SI type UnitFactorsOf Gram = If (IsCanonical Gram) (F Gram One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Gram)) | |
type DimOfUnit Gram Source # | |
Defined in Data.Units.SI | |
type BaseUnit Gram Source # | |
Defined in Data.Units.SI |
Instances
Show Second Source # | |
Unit Second Source # | |
type UnitFactorsOf Second Source # | |
Defined in Data.Units.SI type UnitFactorsOf Second = If (IsCanonical Second) (F Second One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Second)) | |
type DimOfUnit Second Source # | |
Defined in Data.Units.SI | |
type BaseUnit Second Source # | |
Defined in Data.Units.SI |
Derived SI unit
Instances
Show Minute Source # | |
Unit Minute Source # | |
type UnitFactorsOf Minute Source # | |
Defined in Data.Units.SI type UnitFactorsOf Minute = If (IsCanonical Minute) (F Minute One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Minute)) | |
type DimOfUnit Minute Source # | |
type BaseUnit Minute Source # | |
Defined in Data.Units.SI |
Derived SI unit
Instances
Show Hour Source # | |
Unit Hour Source # | |
type UnitFactorsOf Hour Source # | |
Defined in Data.Units.SI type UnitFactorsOf Hour = If (IsCanonical Hour) (F Hour One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Hour)) | |
type DimOfUnit Hour Source # | |
type BaseUnit Hour Source # | |
Defined in Data.Units.SI |
Instances
Show Ampere Source # | |
Unit Ampere Source # | |
type UnitFactorsOf Ampere Source # | |
Defined in Data.Units.SI type UnitFactorsOf Ampere = If (IsCanonical Ampere) (F Ampere One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Ampere)) | |
type DimOfUnit Ampere Source # | |
Defined in Data.Units.SI | |
type BaseUnit Ampere Source # | |
Defined in Data.Units.SI |
Instances
Show Kelvin Source # | |
Unit Kelvin Source # | |
type UnitFactorsOf Kelvin Source # | |
Defined in Data.Units.SI type UnitFactorsOf Kelvin = If (IsCanonical Kelvin) (F Kelvin One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Kelvin)) | |
type DimOfUnit Kelvin Source # | |
Defined in Data.Units.SI | |
type BaseUnit Kelvin Source # | |
Defined in Data.Units.SI |
Instances
Show Mole Source # | |
Unit Mole Source # | |
type UnitFactorsOf Mole Source # | |
Defined in Data.Units.SI type UnitFactorsOf Mole = If (IsCanonical Mole) (F Mole One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Mole)) | |
type DimOfUnit Mole Source # | |
Defined in Data.Units.SI | |
type BaseUnit Mole Source # | |
Defined in Data.Units.SI |
Instances
Show Candela Source # | |
Unit Candela Source # | |
type UnitFactorsOf Candela Source # | |
Defined in Data.Units.SI type UnitFactorsOf Candela = If (IsCanonical Candela) (F Candela One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Candela)) | |
type DimOfUnit Candela Source # | |
Defined in Data.Units.SI | |
type BaseUnit Candela Source # | |
Defined in Data.Units.SI |
The two angular dimensions that must be fundamental dimensions.
Instances
Show Radian Source # | |
Unit Radian Source # | |
type UnitFactorsOf Radian Source # | |
Defined in Data.Units.SI type UnitFactorsOf Radian = If (IsCanonical Radian) (F Radian One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Radian)) | |
type DimOfUnit Radian Source # | |
Defined in Data.Units.SI | |
type BaseUnit Radian Source # | |
Defined in Data.Units.SI |
Instances
Show Steradian Source # | |
Unit Steradian Source # | |
type UnitFactorsOf Steradian Source # | |
Defined in Data.Units.SI type UnitFactorsOf Steradian = If (IsCanonical Steradian) (F Steradian One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Steradian)) | |
type DimOfUnit Steradian Source # | |
Defined in Data.Units.SI | |
type BaseUnit Steradian Source # | |
Defined in Data.Units.SI |
This is not in the SI standard, but is used widely.
Instances
Show Coulomb Source # | |
Unit Coulomb Source # | |
type UnitFactorsOf Coulomb Source # | |
Defined in Data.Units.SI type UnitFactorsOf Coulomb = If (IsCanonical Coulomb) (F Coulomb One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Coulomb)) | |
type DimOfUnit Coulomb Source # | |
type BaseUnit Coulomb Source # | |
Instances
Show Siemens Source # | |
Unit Siemens Source # | |
type UnitFactorsOf Siemens Source # | |
Defined in Data.Units.SI type UnitFactorsOf Siemens = If (IsCanonical Siemens) (F Siemens One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Siemens)) | |
type DimOfUnit Siemens Source # | |
type BaseUnit Siemens Source # | |
Instances
Show Lumen Source # | |
Unit Lumen Source # | |
type UnitFactorsOf Lumen Source # | |
Defined in Data.Units.SI type UnitFactorsOf Lumen = If (IsCanonical Lumen) (F Lumen One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Lumen)) | |
type DimOfUnit Lumen Source # | |
type BaseUnit Lumen Source # | |
Defined in Data.Units.SI |
Instances
Show Becquerel Source # | |
Unit Becquerel Source # | |
type UnitFactorsOf Becquerel Source # | |
Defined in Data.Units.SI type UnitFactorsOf Becquerel = If (IsCanonical Becquerel) (F Becquerel One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Becquerel)) | |
type DimOfUnit Becquerel Source # | |
type BaseUnit Becquerel Source # | |
Instances
Show Sievert Source # | |
Unit Sievert Source # | |
type UnitFactorsOf Sievert Source # | |
Defined in Data.Units.SI type UnitFactorsOf Sievert = If (IsCanonical Sievert) (F Sievert One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Sievert)) | |
type DimOfUnit Sievert Source # | |
type BaseUnit Sievert Source # | |
Instances
Show Degree Source # | |
Unit Degree Source # | |
type UnitFactorsOf Degree Source # | |
Defined in Data.Units.SI type UnitFactorsOf Degree = If (IsCanonical Degree) (F Degree One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Degree)) | |
type DimOfUnit Degree Source # | |
type BaseUnit Degree Source # | |
Defined in Data.Units.SI |
Instances
Show Arcminute Source # | |
Unit Arcminute Source # | |
type UnitFactorsOf Arcminute Source # | |
Defined in Data.Units.SI type UnitFactorsOf Arcminute = If (IsCanonical Arcminute) (F Arcminute One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Arcminute)) | |
type DimOfUnit Arcminute Source # | |
type BaseUnit Arcminute Source # | |
Defined in Data.Units.SI |
Instances
Show Arcsecond Source # | |
Unit Arcsecond Source # | |
type UnitFactorsOf Arcsecond Source # | |
Defined in Data.Units.SI type UnitFactorsOf Arcsecond = If (IsCanonical Arcsecond) (F Arcsecond One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Arcsecond)) | |
type DimOfUnit Arcsecond Source # | |
type BaseUnit Arcsecond Source # | |
Defined in Data.Units.SI |
Derived SI unit
Instances
Show Hectare Source # | |
Unit Hectare Source # | |
type UnitFactorsOf Hectare Source # | |
Defined in Data.Units.SI type UnitFactorsOf Hectare = If (IsCanonical Hectare) (F Hectare One ': ([] :: [Factor Type])) (UnitFactorsOf (BaseUnit Hectare)) | |
type DimOfUnit Hectare Source # | |
type BaseUnit Hectare Source # | |
Derived SI unit
A list of the names of all unit types. Useful with
makeQuasiQuoter
.