| 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 |
Data.Units.SI
Description
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 :: Meter
- 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
Constructors
| Meter |
Instances
| Show Meter Source # | |
| Unit Meter Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Meter :: [Factor Type] # | |
| type UnitFactorsOf Meter Source # | |
Defined in Data.Units.SI | |
| type DimOfUnit Meter Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Meter Source # | |
Defined in Data.Units.SI | |
Constructors
| Gram |
Instances
| Show Gram Source # | |
| Unit Gram Source # | |
Defined in Data.Units.SI | |
| type UnitFactorsOf Gram Source # | |
Defined in Data.Units.SI | |
| type DimOfUnit Gram Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Gram Source # | |
Defined in Data.Units.SI | |
Constructors
| Second |
Instances
| Show Second Source # | |
| Unit Second Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Second :: [Factor Type] # | |
| type UnitFactorsOf Second Source # | |
Defined in Data.Units.SI type UnitFactorsOf Second = If (IsCanonical Second) '['F Second One] (UnitFactorsOf (BaseUnit Second)) | |
| type DimOfUnit Second Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Second Source # | |
Defined in Data.Units.SI | |
Derived SI unit
Constructors
| Minute |
Instances
| Show Minute Source # | |
| Unit Minute Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Minute :: [Factor Type] # | |
| type UnitFactorsOf Minute Source # | |
Defined in Data.Units.SI type UnitFactorsOf Minute = If (IsCanonical Minute) '['F Minute One] (UnitFactorsOf (BaseUnit Minute)) | |
| type DimOfUnit Minute Source # | |
| type BaseUnit Minute Source # | |
Defined in Data.Units.SI | |
Derived SI unit
Constructors
| Hour |
Constructors
| Ampere |
Instances
| Show Ampere Source # | |
| Unit Ampere Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Ampere :: [Factor Type] # | |
| type UnitFactorsOf Ampere Source # | |
Defined in Data.Units.SI type UnitFactorsOf Ampere = If (IsCanonical Ampere) '['F Ampere One] (UnitFactorsOf (BaseUnit Ampere)) | |
| type DimOfUnit Ampere Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Ampere Source # | |
Defined in Data.Units.SI | |
Constructors
| Kelvin |
Instances
| Show Kelvin Source # | |
| Unit Kelvin Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Kelvin :: [Factor Type] # | |
| type UnitFactorsOf Kelvin Source # | |
Defined in Data.Units.SI type UnitFactorsOf Kelvin = If (IsCanonical Kelvin) '['F Kelvin One] (UnitFactorsOf (BaseUnit Kelvin)) | |
| type DimOfUnit Kelvin Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Kelvin Source # | |
Defined in Data.Units.SI | |
Constructors
| Mole |
Instances
| Show Mole Source # | |
| Unit Mole Source # | |
Defined in Data.Units.SI | |
| type UnitFactorsOf Mole Source # | |
Defined in Data.Units.SI | |
| type DimOfUnit Mole Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Mole Source # | |
Defined in Data.Units.SI | |
Constructors
| Candela |
Instances
| Show Candela Source # | |
| Unit Candela Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Candela :: [Factor Type] # | |
| type UnitFactorsOf Candela Source # | |
Defined in Data.Units.SI type UnitFactorsOf Candela = If (IsCanonical Candela) '['F Candela One] (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.
Constructors
| Radian |
Instances
| Show Radian Source # | |
| Unit Radian Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Radian :: [Factor Type] # | |
| type UnitFactorsOf Radian Source # | |
Defined in Data.Units.SI type UnitFactorsOf Radian = If (IsCanonical Radian) '['F Radian One] (UnitFactorsOf (BaseUnit Radian)) | |
| type DimOfUnit Radian Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Radian Source # | |
Defined in Data.Units.SI | |
Constructors
| Steradian |
Instances
| Show Steradian Source # | |
| Unit Steradian Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Steradian :: [Factor Type] # | |
| type UnitFactorsOf Steradian Source # | |
Defined in Data.Units.SI type UnitFactorsOf Steradian = If (IsCanonical Steradian) '['F Steradian One] (UnitFactorsOf (BaseUnit Steradian)) | |
| type DimOfUnit Steradian Source # | |
Defined in Data.Units.SI | |
| type BaseUnit Steradian Source # | |
Defined in Data.Units.SI | |
Constructors
| Hertz |
This is not in the SI standard, but is used widely.
Constructors
| Liter |
Constructors
| Newton |
Instances
| Show Newton Source # | |
| Unit Newton Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Newton :: [Factor Type] # | |
| type UnitFactorsOf Newton Source # | |
Defined in Data.Units.SI type UnitFactorsOf Newton = If (IsCanonical Newton) '['F Newton One] (UnitFactorsOf (BaseUnit Newton)) | |
| type DimOfUnit Newton Source # | |
| type BaseUnit Newton Source # | |
Constructors
| Pascal |
Instances
| Show Pascal Source # | |
| Unit Pascal Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Pascal :: [Factor Type] # | |
| type UnitFactorsOf Pascal Source # | |
Defined in Data.Units.SI type UnitFactorsOf Pascal = If (IsCanonical Pascal) '['F Pascal One] (UnitFactorsOf (BaseUnit Pascal)) | |
| type DimOfUnit Pascal Source # | |
| type BaseUnit Pascal Source # | |
Constructors
| Joule |
Constructors
| Watt |
Constructors
| Coulomb |
Instances
| Show Coulomb Source # | |
| Unit Coulomb Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Coulomb :: [Factor Type] # | |
| type UnitFactorsOf Coulomb Source # | |
Defined in Data.Units.SI type UnitFactorsOf Coulomb = If (IsCanonical Coulomb) '['F Coulomb One] (UnitFactorsOf (BaseUnit Coulomb)) | |
| type DimOfUnit Coulomb Source # | |
| type BaseUnit Coulomb Source # | |
Constructors
| Volt |
Constructors
| Farad |
Constructors
| Ohm |
Constructors
| Siemens |
Instances
| Show Siemens Source # | |
| Unit Siemens Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Siemens :: [Factor Type] # | |
| type UnitFactorsOf Siemens Source # | |
Defined in Data.Units.SI type UnitFactorsOf Siemens = If (IsCanonical Siemens) '['F Siemens One] (UnitFactorsOf (BaseUnit Siemens)) | |
| type DimOfUnit Siemens Source # | |
| type BaseUnit Siemens Source # | |
Constructors
| Weber |
Constructors
| Tesla |
Constructors
| Henry |
Constructors
| Lumen |
Constructors
| Lux |
Constructors
| Becquerel |
Instances
| Show Becquerel Source # | |
| Unit Becquerel Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Becquerel :: [Factor Type] # | |
| type UnitFactorsOf Becquerel Source # | |
Defined in Data.Units.SI type UnitFactorsOf Becquerel = If (IsCanonical Becquerel) '['F Becquerel One] (UnitFactorsOf (BaseUnit Becquerel)) | |
| type DimOfUnit Becquerel Source # | |
| type BaseUnit Becquerel Source # | |
Constructors
| Gray |
Constructors
| Sievert |
Instances
| Show Sievert Source # | |
| Unit Sievert Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Sievert :: [Factor Type] # | |
| type UnitFactorsOf Sievert Source # | |
Defined in Data.Units.SI type UnitFactorsOf Sievert = If (IsCanonical Sievert) '['F Sievert One] (UnitFactorsOf (BaseUnit Sievert)) | |
| type DimOfUnit Sievert Source # | |
| type BaseUnit Sievert Source # | |
Constructors
| Katal |
Constructors
| Degree |
Instances
| Show Degree Source # | |
| Unit Degree Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Degree :: [Factor Type] # | |
| type UnitFactorsOf Degree Source # | |
Defined in Data.Units.SI type UnitFactorsOf Degree = If (IsCanonical Degree) '['F Degree One] (UnitFactorsOf (BaseUnit Degree)) | |
| type DimOfUnit Degree Source # | |
| type BaseUnit Degree Source # | |
Defined in Data.Units.SI | |
Constructors
| Arcminute |
Instances
| Show Arcminute Source # | |
| Unit Arcminute Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Arcminute :: [Factor Type] # | |
| type UnitFactorsOf Arcminute Source # | |
Defined in Data.Units.SI type UnitFactorsOf Arcminute = If (IsCanonical Arcminute) '['F Arcminute One] (UnitFactorsOf (BaseUnit Arcminute)) | |
| type DimOfUnit Arcminute Source # | |
| type BaseUnit Arcminute Source # | |
Defined in Data.Units.SI | |
Constructors
| Arcsecond |
Instances
| Show Arcsecond Source # | |
| Unit Arcsecond Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Arcsecond :: [Factor Type] # | |
| type UnitFactorsOf Arcsecond Source # | |
Defined in Data.Units.SI type UnitFactorsOf Arcsecond = If (IsCanonical Arcsecond) '['F Arcsecond One] (UnitFactorsOf (BaseUnit Arcsecond)) | |
| type DimOfUnit Arcsecond Source # | |
| type BaseUnit Arcsecond Source # | |
Defined in Data.Units.SI | |
Derived SI unit
Constructors
| Hectare |
Instances
| Show Hectare Source # | |
| Unit Hectare Source # | |
Defined in Data.Units.SI Associated Types type UnitFactorsOf Hectare :: [Factor Type] # | |
| type UnitFactorsOf Hectare Source # | |
Defined in Data.Units.SI type UnitFactorsOf Hectare = If (IsCanonical Hectare) '['F Hectare One] (UnitFactorsOf (BaseUnit Hectare)) | |
| type DimOfUnit Hectare Source # | |
| type BaseUnit Hectare Source # | |
Derived SI unit
Constructors
| Ton |
A list of the names of all unit types. Useful with
makeQuasiQuoter.