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 defines the Imperial system of units, based on the
Exchequer Standards of 1825. Two big differences between the
Imperial system and the US customary one are that because the
USA declared their independence from the UK in 1776, the US
customary system is based on the previous Winchester Standards, and
that the Imperial system uses the same units for dry and fluid
measures. This module gathers together a subjective set of units of
general use appearing <https://en.wikipedia.org/wiki/Imperial_units
here>, submodules will gather measures of more limited use. It also
exports type instances DefaultUnitOfDim
that use the SI internal
representations. This choice is made for inter-compatibility with SI
computations. If you want the foot-pound-second system, use the FPS
.
Where possible, reference have been made to UK legislation. However, Wikipedia's page is much better organized than any government resource immediately available.
The UK legislation used as references are as follows: http://www.legislation.gov.uk/ukpga/1985/72/enacted http://www.legislation.gov.uk/uksi/1994/2867/schedule/part/VI/made http://www.legislation.gov.uk/uksi/1995/1804/schedule/made
Synopsis
- data Thou = Thou
- data Inch = Inch
- data Foot = Foot
- data Yard = Yard
- data Mile = Mile
- data NauticalMile = NauticalMile
- data Knot = Knot
- data Acre = Acre
- data FluidOunce = FluidOunce
- data Pint = Pint
- data Quart = Quart
- data Gallon = Gallon
- data Ounce = Ounce
- data Pound = Pound
- data Stone = Stone
- data Ton = Ton
- data InchOfWater = InchOfWater
- data FootPoundForce = FootPoundForce
- data Therm = Therm
- data BritishThermalUnit = BritishThermalUnit
- data Horsepower = Horsepower
- data Fahrenheit = Fahrenheit
Lengths
Instances
Show Thou Source # | |
Unit Thou Source # | |
Defined in Data.Units.Imperial.Length conversionRatio :: Thou -> Rational # canonicalConvRatio :: Thou -> Rational | |
type UnitFactorsOf Thou Source # | |
Defined in Data.Units.Imperial.Length | |
type DimOfUnit Thou Source # | |
type BaseUnit Thou Source # | |
Defined in Data.Units.Imperial.Length |
Instances
Show Inch Source # | |
Unit Inch Source # | |
Defined in Data.Units.Imperial.Length conversionRatio :: Inch -> Rational # canonicalConvRatio :: Inch -> Rational | |
type UnitFactorsOf Inch Source # | |
Defined in Data.Units.Imperial.Length | |
type DimOfUnit Inch Source # | |
type BaseUnit Inch Source # | |
Defined in Data.Units.Imperial.Length |
Instances
Show Foot Source # | |
Unit Foot Source # | |
Defined in Data.Units.Imperial.Length conversionRatio :: Foot -> Rational # canonicalConvRatio :: Foot -> Rational | |
type UnitFactorsOf Foot Source # | |
Defined in Data.Units.Imperial.Length | |
type DimOfUnit Foot Source # | |
type BaseUnit Foot Source # | |
Defined in Data.Units.Imperial.Length |
Instances
Show Yard Source # | |
Unit Yard Source # | |
Defined in Data.Units.Imperial.Length conversionRatio :: Yard -> Rational # canonicalConvRatio :: Yard -> Rational | |
type UnitFactorsOf Yard Source # | |
Defined in Data.Units.Imperial.Length | |
type DimOfUnit Yard Source # | |
type BaseUnit Yard Source # | |
Defined in Data.Units.Imperial.Length |
Instances
Show Mile Source # | |
Unit Mile Source # | |
Defined in Data.Units.Imperial.Length conversionRatio :: Mile -> Rational # canonicalConvRatio :: Mile -> Rational | |
type UnitFactorsOf Mile Source # | |
Defined in Data.Units.Imperial.Length | |
type DimOfUnit Mile Source # | |
type BaseUnit Mile Source # | |
Defined in Data.Units.Imperial.Length |
data NauticalMile Source #
Instances
Show NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical showsPrec :: Int -> NauticalMile -> ShowS # show :: NauticalMile -> String # showList :: [NauticalMile] -> ShowS # | |
Unit NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical type BaseUnit NauticalMile # type DimOfUnit NauticalMile # type UnitFactorsOf NauticalMile :: [Factor Type] # | |
type UnitFactorsOf NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical type UnitFactorsOf NauticalMile = If (IsCanonical NauticalMile) '['F NauticalMile One] (UnitFactorsOf (BaseUnit NauticalMile)) | |
type DimOfUnit NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical | |
type BaseUnit NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical |
Velocity
Instances
Show Knot Source # | |
Unit Knot Source # | |
Defined in Data.Units.Imperial.Misc conversionRatio :: Knot -> Rational # canonicalConvRatio :: Knot -> Rational | |
type UnitFactorsOf Knot Source # | |
Defined in Data.Units.Imperial.Misc | |
type DimOfUnit Knot Source # | |
type BaseUnit Knot Source # | |
Defined in Data.Units.Imperial.Misc |
Area
Volume
data FluidOunce Source #
Instances
Show FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume showsPrec :: Int -> FluidOunce -> ShowS # show :: FluidOunce -> String # showList :: [FluidOunce] -> ShowS # | |
Unit FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume type BaseUnit FluidOunce # type DimOfUnit FluidOunce # type UnitFactorsOf FluidOunce :: [Factor Type] # | |
type UnitFactorsOf FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume type UnitFactorsOf FluidOunce = If (IsCanonical FluidOunce) '['F FluidOunce One] (UnitFactorsOf (BaseUnit FluidOunce)) | |
type DimOfUnit FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume | |
type BaseUnit FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume |
Instances
Show Pint Source # | |
Unit Pint Source # | |
Defined in Data.Units.Imperial.Volume conversionRatio :: Pint -> Rational # canonicalConvRatio :: Pint -> Rational | |
type UnitFactorsOf Pint Source # | |
Defined in Data.Units.Imperial.Volume | |
type DimOfUnit Pint Source # | |
type BaseUnit Pint Source # | |
Defined in Data.Units.Imperial.Volume |
Instances
Show Quart Source # | |
Unit Quart Source # | |
Defined in Data.Units.Imperial.Volume conversionRatio :: Quart -> Rational # canonicalConvRatio :: Quart -> Rational | |
type UnitFactorsOf Quart Source # | |
Defined in Data.Units.Imperial.Volume | |
type DimOfUnit Quart Source # | |
type BaseUnit Quart Source # | |
Defined in Data.Units.Imperial.Volume |
Instances
Show Gallon Source # | |
Unit Gallon Source # | |
Defined in Data.Units.Imperial.Volume conversionRatio :: Gallon -> Rational # canonicalConvRatio :: Gallon -> Rational | |
type UnitFactorsOf Gallon Source # | |
Defined in Data.Units.Imperial.Volume type UnitFactorsOf Gallon = If (IsCanonical Gallon) '['F Gallon One] (UnitFactorsOf (BaseUnit Gallon)) | |
type DimOfUnit Gallon Source # | |
type BaseUnit Gallon Source # | |
Defined in Data.Units.Imperial.Volume |
Mass
These are all in the avoirdupois system
Instances
Show Ounce Source # | |
Unit Ounce Source # | |
Defined in Data.Units.Imperial.Weight conversionRatio :: Ounce -> Rational # canonicalConvRatio :: Ounce -> Rational | |
type UnitFactorsOf Ounce Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Ounce Source # | |
type BaseUnit Ounce Source # | |
Defined in Data.Units.Imperial.Weight |
Instances
Show Pound Source # | |
Unit Pound Source # | |
Defined in Data.Units.Imperial.Weight conversionRatio :: Pound -> Rational # canonicalConvRatio :: Pound -> Rational | |
type UnitFactorsOf Pound Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Pound Source # | |
type BaseUnit Pound Source # | |
Defined in Data.Units.Imperial.Weight |
Instances
Show Stone Source # | |
Unit Stone Source # | |
Defined in Data.Units.Imperial.Weight conversionRatio :: Stone -> Rational # canonicalConvRatio :: Stone -> Rational | |
type UnitFactorsOf Stone Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Stone Source # | |
type BaseUnit Stone Source # | |
Defined in Data.Units.Imperial.Weight |
Instances
Show Ton Source # | |
Unit Ton Source # | |
Defined in Data.Units.Imperial.Weight conversionRatio :: Ton -> Rational # canonicalConvRatio :: Ton -> Rational | |
type UnitFactorsOf Ton Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Ton Source # | |
type BaseUnit Ton Source # | |
Defined in Data.Units.Imperial.Weight |
Pressure
data InchOfWater Source #
Instances
Show InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc showsPrec :: Int -> InchOfWater -> ShowS # show :: InchOfWater -> String # showList :: [InchOfWater] -> ShowS # | |
Unit InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc type BaseUnit InchOfWater # type DimOfUnit InchOfWater # type UnitFactorsOf InchOfWater :: [Factor Type] # | |
type UnitFactorsOf InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc type UnitFactorsOf InchOfWater = If (IsCanonical InchOfWater) '['F InchOfWater One] (UnitFactorsOf (BaseUnit InchOfWater)) | |
type DimOfUnit InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc | |
type BaseUnit InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc |
Energy
data FootPoundForce Source #
Instances
Show FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc showsPrec :: Int -> FootPoundForce -> ShowS # show :: FootPoundForce -> String # showList :: [FootPoundForce] -> ShowS # | |
Unit FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc type BaseUnit FootPoundForce # type DimOfUnit FootPoundForce # type UnitFactorsOf FootPoundForce :: [Factor Type] # | |
type UnitFactorsOf FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc type UnitFactorsOf FootPoundForce = If (IsCanonical FootPoundForce) '['F FootPoundForce One] (UnitFactorsOf (BaseUnit FootPoundForce)) | |
type DimOfUnit FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc | |
type BaseUnit FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc |
Instances
Show Therm Source # | |
Unit Therm Source # | |
Defined in Data.Units.Imperial.Misc conversionRatio :: Therm -> Rational # canonicalConvRatio :: Therm -> Rational | |
type UnitFactorsOf Therm Source # | |
Defined in Data.Units.Imperial.Misc | |
type DimOfUnit Therm Source # | |
type BaseUnit Therm Source # | |
Defined in Data.Units.Imperial.Misc |
data BritishThermalUnit Source #
Instances
Show BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc showsPrec :: Int -> BritishThermalUnit -> ShowS # show :: BritishThermalUnit -> String # showList :: [BritishThermalUnit] -> ShowS # | |
Unit BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc type BaseUnit BritishThermalUnit # type DimOfUnit BritishThermalUnit # type UnitFactorsOf BritishThermalUnit :: [Factor Type] # | |
type UnitFactorsOf BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc | |
type DimOfUnit BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc | |
type BaseUnit BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc |
Power
data Horsepower Source #
Instances
Show Horsepower Source # | |
Defined in Data.Units.Imperial.Misc showsPrec :: Int -> Horsepower -> ShowS # show :: Horsepower -> String # showList :: [Horsepower] -> ShowS # | |
Unit Horsepower Source # | |
Defined in Data.Units.Imperial.Misc type BaseUnit Horsepower # type DimOfUnit Horsepower # type UnitFactorsOf Horsepower :: [Factor Type] # | |
type UnitFactorsOf Horsepower Source # | |
Defined in Data.Units.Imperial.Misc type UnitFactorsOf Horsepower = If (IsCanonical Horsepower) '['F Horsepower One] (UnitFactorsOf (BaseUnit Horsepower)) | |
type DimOfUnit Horsepower Source # | |
Defined in Data.Units.Imperial.Misc | |
type BaseUnit Horsepower Source # | |
Defined in Data.Units.Imperial.Misc |
Temperature
data Fahrenheit Source #
Instances
Show Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc showsPrec :: Int -> Fahrenheit -> ShowS # show :: Fahrenheit -> String # showList :: [Fahrenheit] -> ShowS # | |
Unit Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc type BaseUnit Fahrenheit # type DimOfUnit Fahrenheit # type UnitFactorsOf Fahrenheit :: [Factor Type] # | |
type UnitFactorsOf Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc type UnitFactorsOf Fahrenheit = If (IsCanonical Fahrenheit) '['F Fahrenheit One] (UnitFactorsOf (BaseUnit Fahrenheit)) | |
type DimOfUnit Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc | |
type BaseUnit Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc |