HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduledimensional-1.5Haskell2010

Numeric.Units.Dimensional.NonSI

Summary

This module defines units that are not part of the SI, with the exception of those defined in the Numeric.Units.Dimensional.SIUnits module (units outside of the SI accepted for use with the SI).

Any chapters, sections or tables referenced are from [1] unless otherwise specified.

Neper, bel, shannon and the like

The units of section 5.1.2 are purposefully (but not permanently) omitted. In fact the logarithmic units (see section 8.7) are problematic and it is not clear how to implement them. Perhaps with a conversion function similar to for degrees Celsius.

References

  1. https://www.nist.gov/pml/special-publication-811

  2. https://www.iau.org/publications/proceedings_rules/units/

  3. https://en.wikipedia.org/wiki/Pressure

  4. https://en.wikipedia.org/wiki/Torr

  • 61 values
  • Packagedimensional-1.5
  • Exports61
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceNonSI.hs

Units Defined By Experiment

4 declarations

From Table 7, units accepted for use with the SI whose values in SI units are obtained experimentally.

When [1] was published, the electron volt had a standard combined uncertainity of 0.00000049e-19 J and the unified atomic mass unit had a combined uncertainty of 0.0000010e-27 kg.

Dimensionless Units

1 declaration
valuepercent :: Fractional a => Unit 'NonMetric DOne a
#

One percent is one hundrendth.

The dimensionless number 0.01, represented by the symbol %, is commonly used as a dimensionless unit.

See section 7.10.2 of the [1] for further information.

Example1 expression
1 *~ percent1.0e-2

Standard Gravity

1 declaration
valuegee :: Fractional a => Unit 'Metric DAcceleration a
#

One gee is the standard value of the acceleration due to gravity at the Earth's surface, as standardized by CIPM.

Note that local values of acceleration due to gravity will differ from the standard gravity.

See here for further information.

Example1 expression
1 *~ gee9.80665 m s^-2
Example1 expression
1 *~ gee :: Acceleration Rational196133 % 20000 m s^-2

Inch-pound Units

13 declarations

Some US customary (that is, inch-pound) units.

One avoirdupois pound is a mass, exactly defined in terms of the kilogram by the international yard and pound agreement of 1959.

See here for further information.

Example1 expression
1 *~ poundMass0.45359237 kg
Example1 expression
1 *~ poundMass :: Mass Rational45359237 % 100000000 kg
valueounce :: Fractional a => Unit 'NonMetric DMass a
#

One avoirdupois ounce is one sixteenth of a poundMass.

See here for further information.

Example1 expression
1 *~ ounce2.8349523125e-2 kg
Property
16 *~ ounce === 1 *~ poundMass
Example1 expression
1 *~ ounce :: Mass Rational45359237 % 1600000000 kg

The pound-force is equal to the gravitational force exerted on a mass of one avoirdupois pound on the surface of Earth.

This definition is based on standard gravity (the gee) and the international avoirdupois poundMass.

See here for further information.

Example1 expression
1 *~ poundForce4.4482216152605 m kg s^-2
Property
1 *~ poundForce === 1 *~ poundMass * (1 *~ gee)
Example1 expression
1 *~ poundForce :: Force Rational8896443230521 % 2000000000000 m kg s^-2

One mechanical horsepower is by definition the power necessary to apply a force of 550 poundForce through a distance of one foot per second.

See here for further information.

Example1 expression
1 *~ horsepower745.6998715822702 m^2 kg s^-3
Property
1 *~ horsepower === 550 *~ poundForce * (1 *~ foot) / (1 *~ second)
Example1 expression
1 *~ horsepower :: Power Rational37284993579113511 % 50000000000000 m^2 kg s^-3
valuebtu :: Fractional a => Unit 'NonMetric DEnergy a
#

One btu is is the QuantityOfHeat required to raise the temperature of 1 avoirdupois poundMass of liquid water by 1 degreeFahrenheit at a constant pressure of one atmosphere.

Because this value must be determined experimentally and varies with temperature, several standardized values of the btu have arisen. This is the value based on the International Steam Table calorie, defined by the Fifth International Conference on the Properties of Steam.

See here for further information.

Example1 expression
1 *~ btu1055.05585262 m^2 kg s^-2
Example1 expression
1 *~ btu :: Energy Rational52752792631 % 50000000 m^2 kg s^-2
valueshortTon :: Fractional a => Unit 'NonMetric DMass a
#

One short ton is two thousand poundMass.

See here for further information.

Example1 expression
1 *~ shortTon907.18474 kg
Example1 expression
1 *~ shortTon :: Mass Rational45359237 % 50000 kg
valuenauticalMile :: Num a => Unit 'NonMetric DLength a
#

One nautical mile is a unit of length, set by international agreement as being exactly 1 852 meters.

Historically, it was defined as the distance spanned by one minute of arc along a meridian of the Earth.

See here for further information.

Example1 expression
1 *~ nauticalMile1852.0 m
Example1 expression
1 *~ nauticalMile :: Length Rational1852 % 1 m
valuerevolution :: Floating a => Unit 'NonMetric DOne a
#

One revolution is an angle equal to 2*pi radians; a full circle.

See here for further information.

Example1 expression
1 *~ revolution6.283185307179586
Property
1 *~ revolution === _2 * pi * (1 *~ radian)
Property
1 *~ revolution === 360 *~ degree
valueslug :: Fractional a => Unit 'NonMetric DMass a
#

The slug is a unit of mass associated with Imperial units and United States customary units. It is a mass that accelerates by 1 foot per second per second when a force of one pound is exerted on it.

This definition is based on standard gravity (the gee), the international foot, and the international avoirdupois poundMass.

See here for further information.

Example1 expression
1 *~ slug14.593902937206364 kg
Example1 expression
1 *~ slug :: Mass Rational8896443230521 % 609600000000 kg
valuepsi :: Fractional a => Unit 'NonMetric DPressure a
#

One psi is a pressure of one poundForce per square inch of area.

See here for further information.

Example1 expression
1 *~ psi6894.757293168362 m^-1 kg s^-2
Example1 expression
1 *~ psi :: Pressure Rational8896443230521 % 1290320000 m^-1 kg s^-2

International Foot

valuefoot :: Fractional a => Unit 'NonMetric DLength a
#

One international foot is one third of an international yard.

See here for further information.

Example1 expression
1 *~ foot0.3048 m
Property
3 *~ foot === 1 *~ yard
Example1 expression
1 *~ foot :: Length Rational381 % 1250 m
valueinch :: Fractional a => Unit 'NonMetric DLength a
#

One inch is one twelth of a foot.

This inch is based on the international foot.

See here for further information.

Example1 expression
1 *~ inch2.54e-2 m
Property
12 *~ inch === 1 *~ foot
Example1 expression
1 *~ inch :: Length Rational127 % 5000 m
valuemil :: Fractional a => Unit 'NonMetric DLength a
#

One mil is one thousandth of an inch.

This mil is based on the international inch.

See here for further information.

Example1 expression
1 *~ mil2.54e-5 m
Property
1000 *~ mil === 1 *~ inch
Example1 expression
1 *~ mil :: Length Rational127 % 5000000 m
valueyard :: Fractional a => Unit 'NonMetric DLength a
#

One yard, as defined by international agreement in 1959, is precisely 0.9144 meter.

See here for further information.

Example1 expression
1 *~ yard0.9144 m
Example1 expression
1 *~ yard :: Length Rational1143 % 1250 m
valuemile :: Fractional a => Unit 'NonMetric DLength a
#

One mile is 5 280 feet.

This mile is based on the international foot.

See here for further information.

Example1 expression
1 *~ mile1609.344 m
Property
1 *~ mile === 5280 *~ foot
Example1 expression
1 *~ mile :: Length Rational201168 % 125 m
valueacre :: Fractional a => Unit 'NonMetric DArea a
#

One acre is 43 560 square feet.

This acre is based on the international foot. For the acre based on the US Survey Foot, see usSurveyAcre. While both acres are in use, the difference between them is of little consequence for most applications in which either is used.

See here for further information.

Example1 expression
1 *~ acre4046.8564224 m^2
Property
1 *~ acre === 43560 *~ foot ^ pos2
Example1 expression
1 *~ acre :: Area Rational316160658 % 78125 m^2

US Survey Foot

One US survey foot is 1200/3937 meter.

For the international foot, see foot. Note that this is not the foot in routine use in the United States.

See here for further information.

Example1 expression
1 *~ usSurveyFoot0.3048006096012192 m
Example1 expression
1 *~ usSurveyFoot :: Length Rational1200 % 3937 m

One inch is one twelth of a foot.

This inch is based on the usSurveyFoot. For the inch based on the international foot, see inch. Note that this is not the inch in routine use in the United States.

See here for further information.

Example1 expression
1 *~ usSurveyInch2.54000508001016e-2 m
Property
12 *~ usSurveyInch === 1 *~ usSurveyFoot
Example1 expression
1 *~ usSurveyInch :: Length Rational100 % 3937 m

One mil is one thousandth of an inch.

This mil is based on the usSurveyInch. For the mil based on the international inch, see mil. Note that this is not the mil in routine use in the United States.

See here for further information.

Example1 expression
1 *~ usSurveyMil2.54000508001016e-5 m
Property
1000 *~ usSurveyMil === 1 *~ usSurveyInch
Example1 expression
1 *~ usSurveyMil :: Length Rational1 % 39370 m

One yard is three feet.

This yard is based on the usSurveyFoot. For the international yard, see yard. Note that this is not the yard in routine use in the United States.

See here for further information.

Example1 expression
1 *~ usSurveyYard0.9144018288036576 m
Property
1 *~ usSurveyYard === 3 *~ usSurveyFoot
Example1 expression
1 *~ usSurveyYard :: Length Rational3600 % 3937 m

One US survey mile is 5 280 US survey feet.

This mile is based on the usSurveyFoot. For the mile based on the international foot, see mile. Note that this is not the mile in routine use in the United States.

See here for further information.

Example1 expression
1 *~ usSurveyMile1609.3472186944373 m
Property
1 *~ usSurveyMile === 5280 *~ usSurveyFoot
Example1 expression
1 *~ usSurveyMile :: Length Rational6336000 % 3937 m

One acre is 43 560 square feet.

This acre is based on the usSurveyFoot. For the acre based on the international foot, see acre. While both acres are in use, the difference between them is of little consequence for most applications in which either is used. This is the only acre defined by the UCUM.

See here for further information.

Example1 expression
1 *~ usSurveyAcre4046.872609874252 m^2
Property
1 *~ usSurveyAcre === 43560 *~ usSurveyFoot ^ pos2
Example1 expression
1 *~ usSurveyAcre :: Area Rational62726400000 % 15499969 m^2

Years

4 declarations

The IAU recommends [2] that:

Although there are several different kinds of year (as there are several kinds of day), it is best to regard a year as a Julian year of 365.25 days (31557600 s) unless otherwise specified.

valueyear :: Num a => Unit 'NonMetric DTime a
#

One Julian year is a unit of measurement of time defined as exactly 365.25 days of 86 400 seconds each.

See here for further information.

Property
1 *~ year === 365.25 *~ day
Example1 expression
1 *~ year3.15576e7 s
Example1 expression
1 *~ year :: Time Rational31557600 % 1 s
valuedecade :: Num a => Unit 'NonMetric DTime a
#

One Julian decade is ten Julian years.

Property
1 *~ decade === 10 *~ year
Example1 expression
1 *~ decade3.15576e8 s
Example1 expression
1 *~ decade :: Time Rational315576000 % 1 s
valuecentury :: Num a => Unit 'NonMetric DTime a
#

One Julian century is one hundred Julian years, or 35 525 days of 86 400 seconds each.

Property
1 *~ century === 100 *~ year
Property
1 *~ century === 36525 *~ day
Example1 expression
1 *~ century3.15576e9 s
Example1 expression
1 *~ century :: Time Rational3155760000 % 1 s
valuemillennium :: Num a => Unit 'NonMetric DTime a
#

One Julian millennium is one thousand Julian years.

Property
1 *~ millennium === 1000 *~ year
Example1 expression
1 *~ millennium3.15576e10 s
Example1 expression
1 *~ millennium :: Time Rational31557600000 % 1 s

Pressure Units

8 declarations

It seems that nearly every area of application has its own customary unit for measuring pressure. We include some of the common ones here. psi was defined earlier.

valuebar :: Num a => Unit 'Metric DPressure a
#

The bar is exactly 100 000 pascal.

From Wikipedia:

It is about equal to the atmospheric pressure on Earth at sea level.

Example1 expression
1 *~ bar100000.0 m^-1 kg s^-2
Example1 expression
1 *~ bar :: Pressure Rational100000 % 1 m^-1 kg s^-2
valueatmosphere :: Num a => Unit 'NonMetric DPressure a
#

The "standard atmosphere".

From Wikipedia [3]:

The standard atmosphere (atm) is an established constant. It is approximately equal to typical air pressure at earth mean sea level.

Example1 expression
1 *~ atmosphere101325.0 m^-1 kg s^-2
Example1 expression
1 *~ atmosphere :: Pressure Rational101325 % 1 m^-1 kg s^-2

The "technical atmosphere"

From Wikipedia:

A technical atmosphere (symbol: at) is a non-SI unit of pressure equal to one kilogram-force per square centimeter.

Example1 expression
1 *~ technicalAtmosphere98066.5 m^-1 kg s^-2
Example1 expression
1 *~ technicalAtmosphere :: Pressure Rational196133 % 2 m^-1 kg s^-2
valuemmHg :: Fractional a => Unit 'NonMetric DPressure a
#

The conventional value for the pressure exerted by a 1 mm high column of mercury.

Per Wikipedia [4], one mmHg (millimeter of mercury) is defined as:

The pressure exerted at the base of a column of fluid exactly 1 mm high, when the density of the fluid is exactly 13.5951 g/cm^3, at a place where the acceleration of gravity is exactly 9.80665 m/s^2.

The chosen fluid density approximately corresponds to that of mercury at 0 deg. Under most conditions, 1 mmHg is approximately equal to 1 torr.

Example1 expression
1 *~ mmHg133.322 m^-1 kg s^-2
Example1 expression
1 *~ mmHg :: Pressure Rational66661 % 500 m^-1 kg s^-2
valueinHg :: Fractional a => Unit 'NonMetric DPressure a
#

The conventional value for the pressure exerted by a 1 inch high column of mercury.

Column inches of mercury are also used to measure pressure, especially in meteorological or aeronautical contexts in the United States.

This is the value defined by UCUM. For the value defined by NIST, see inHg_NIST.

Example1 expression
1 *~ inHg3386.3788 m^-1 kg s^-2
Example1 expression
1 *~ inHg :: Pressure Rational8465947 % 2500 m^-1 kg s^-2

The conventional value for the pressure exerted by a 1 inch high column of mercury.

Column inches of mercury are also used to measure pressure, especially in meteorological or aeronautical contexts in the United States.

This is the value defined by UCUM. For the value defined by NIST, see inHg_NIST.

Example1 expression
1 *~ inHg_UCUM3386.3788 m^-1 kg s^-2
Example1 expression
1 *~ inHg_UCUM :: Pressure Rational8465947 % 2500 m^-1 kg s^-2

The conventional value for the pressure exerted by a 1 inch high column of mercury.

Column inches of mercury are also used to measure pressure, especially in meteorological or aeronautical contexts in the United States.

This is the value defined by NIST. For the value defined by UCUM, see inHg_UCUM.

Example1 expression
1 *~ inHg_NIST3386.389 m^-1 kg s^-2
Example1 expression
1 *~ inHg_NIST :: Pressure Rational3386389 % 1000 m^-1 kg s^-2
valuetorr :: Fractional a => Unit 'NonMetric DPressure a
#

One torr (symbol: Torr) is defined as 1/760 atmosphere, which is approximately equal to 1 mmHg.

See here for further information.

Example1 expression
1 *~ torr133.32236842105263 m^-1 kg s^-2
Example1 expression
1 *~ torr :: Pressure Rational20265 % 152 m^-1 kg s^-2

Radiation Units

1 declaration

Kinematic Viscosity

1 declaration

Temperature

2 declarations

These units of temperature are relative. For absolute temperatures, see fromDegreeCelsiusAbsolute.

One degree Fahrenheit is a unit of relative temperature equal to 5/9 kelvin.

Note that although the Fahrenheit scale is an absolute temperature scale, this unit is a unit of difference within that scale and measures relative temperature.

See here for further information.

Example1 expression
1 *~ degreeFahrenheit0.5555555555555556 K
Example1 expression
1 *~ degreeFahrenheit :: ThermodynamicTemperature Rational5 % 9 K

One degree Rankine is a unit of relative temperature equal to 5/9 kelvin.

Note that although the Rankine scale is an absolute temperature scale, this unit is a unit of difference within that scale and measures relative temperature.

See here for further information.

Example1 expression
1 *~ degreeRankine0.5555555555555556 K
Example1 expression
1 *~ degreeRankine :: ThermodynamicTemperature Rational5 % 9 K

Imperial Volumes

6 declarations

One imperial gallon is defined exactly in terms of the liter by the Weights and Measures Act 1985.

See here for further information.

Example1 expression
1 *~ imperialGallon4.54609e-3 m^3
Example1 expression
1 *~ imperialGallon :: Volume Rational454609 % 100000000 m^3

One imperial cup is one half of an imperialPint.

This unit is not in common use and is does not appear in some sources describing the imperial fluid volume units.

See here for further information.

Example1 expression
1 *~ imperialCup2.84130625e-4 m^3
Example1 expression
1 *~ imperialCup :: Volume Rational454609 % 1600000000 m^3

One imperial gill is one quarter of an imperialPint.

See here for further information.

Example1 expression
1 *~ imperialGill1.420653125e-4 m^3
Example1 expression
1 *~ imperialGill :: Volume Rational454609 % 3200000000 m^3

US Customary Volumes

6 declarations

Per https://www.nist.gov/system/files/documents/2017/05/09/2012-hb44-final.pdf page 452 and https://en.wikipedia.org/wiki/United_States_customary_units#Fluid_volume Note that there exist rarely-used "dry" variants of units with overlapping names.

One US liquid gallon is a volume of 231 cubic inches.

See here for further information.

Example1 expression
1 *~ usGallon3.785411784e-3 m^3
Example1 expression
1 *~ usGallon :: Volume Rational473176473 % 125000000000 m^3

One US liquid quart is one quarter of a usGallon.

See here for further information.

Example1 expression
1 *~ usQuart9.46352946e-4 m^3
Example1 expression
1 *~ usQuart :: Volume Rational473176473 % 500000000000 m^3
valueusPint :: Fractional a => Unit 'NonMetric DVolume a
#

One US liquid pint is one half of a usQuart.

See here for further information.

Example1 expression
1 *~ usPint4.73176473e-4 m^3
Example1 expression
1 *~ usPint :: Volume Rational473176473 % 1000000000000 m^3
valueusCup :: Fractional a => Unit 'NonMetric DVolume a
#

One US liquid cup is one half of a usPint.

See here for further information.

Example1 expression
1 *~ usCup2.365882365e-4 m^3
Example1 expression
1 *~ usCup :: Volume Rational473176473 % 2000000000000 m^3
valueusGill :: Fractional a => Unit 'NonMetric DVolume a
#

One US liquid gill is one half of a usCup.

See here for further information.

Example1 expression
1 *~ usGill1.1829411825e-4 m^3
Example1 expression
1 *~ usGill :: Volume Rational473176473 % 4000000000000 m^3

One US fluid ounce is 1128 usGallon or 18 usCup.

See here for further information.

Example1 expression
1 *~ usFluidOunce2.95735295625e-5 m^3
Example1 expression
1 *~ usFluidOunce :: Volume Rational473176473 % 16000000000000 m^3

Atomic-Scale Units

1 declaration

Units from the Centimeter-Gram-Second Electrostatic System of Units

1 declaration