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.Imperial
Description
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
Constructors
Thou |
Constructors
Inch |
Constructors
Foot |
Constructors
Yard |
Constructors
Mile |
data NauticalMile Source #
Constructors
NauticalMile |
Instances
Show NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical Methods showsPrec :: Int -> NauticalMile -> ShowS # show :: NauticalMile -> String # showList :: [NauticalMile] -> ShowS # | |
Unit NauticalMile Source # | |
Defined in Data.Units.Imperial.Nautical Associated Types 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
Constructors
Knot |
Area
Constructors
Acre |
Volume
data FluidOunce Source #
Constructors
FluidOunce |
Instances
Show FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume Methods showsPrec :: Int -> FluidOunce -> ShowS # show :: FluidOunce -> String # showList :: [FluidOunce] -> ShowS # | |
Unit FluidOunce Source # | |
Defined in Data.Units.Imperial.Volume Associated Types 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 |
Constructors
Pint |
Constructors
Quart |
Instances
Show Quart Source # | |
Unit Quart Source # | |
Defined in Data.Units.Imperial.Volume Associated Types type UnitFactorsOf Quart :: [Factor Type] # | |
type UnitFactorsOf Quart Source # | |
Defined in Data.Units.Imperial.Volume | |
type DimOfUnit Quart Source # | |
type BaseUnit Quart Source # | |
Defined in Data.Units.Imperial.Volume |
Constructors
Gallon |
Instances
Show Gallon Source # | |
Unit Gallon Source # | |
Defined in Data.Units.Imperial.Volume Associated Types type UnitFactorsOf Gallon :: [Factor Type] # | |
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
Constructors
Ounce |
Instances
Show Ounce Source # | |
Unit Ounce Source # | |
Defined in Data.Units.Imperial.Weight Associated Types type UnitFactorsOf Ounce :: [Factor Type] # | |
type UnitFactorsOf Ounce Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Ounce Source # | |
type BaseUnit Ounce Source # | |
Defined in Data.Units.Imperial.Weight |
Constructors
Pound |
Instances
Show Pound Source # | |
Unit Pound Source # | |
Defined in Data.Units.Imperial.Weight Associated Types type UnitFactorsOf Pound :: [Factor Type] # | |
type UnitFactorsOf Pound Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Pound Source # | |
type BaseUnit Pound Source # | |
Defined in Data.Units.Imperial.Weight |
Constructors
Stone |
Instances
Show Stone Source # | |
Unit Stone Source # | |
Defined in Data.Units.Imperial.Weight Associated Types type UnitFactorsOf Stone :: [Factor Type] # | |
type UnitFactorsOf Stone Source # | |
Defined in Data.Units.Imperial.Weight | |
type DimOfUnit Stone Source # | |
type BaseUnit Stone Source # | |
Defined in Data.Units.Imperial.Weight |
Constructors
Ton |
Pressure
data InchOfWater Source #
Constructors
InchOfWater |
Instances
Show InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc Methods showsPrec :: Int -> InchOfWater -> ShowS # show :: InchOfWater -> String # showList :: [InchOfWater] -> ShowS # | |
Unit InchOfWater Source # | |
Defined in Data.Units.Imperial.Misc Associated Types 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 #
Constructors
FootPoundForce |
Instances
Show FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc Methods showsPrec :: Int -> FootPoundForce -> ShowS # show :: FootPoundForce -> String # showList :: [FootPoundForce] -> ShowS # | |
Unit FootPoundForce Source # | |
Defined in Data.Units.Imperial.Misc Associated Types type BaseUnit FootPoundForce # type DimOfUnit FootPoundForce # type UnitFactorsOf FootPoundForce :: [Factor Type] # Methods | |
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 |
Constructors
Therm |
Instances
Show Therm Source # | |
Unit Therm Source # | |
Defined in Data.Units.Imperial.Misc Associated Types type UnitFactorsOf Therm :: [Factor Type] # | |
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 #
Constructors
BritishThermalUnit |
Instances
Show BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc Methods showsPrec :: Int -> BritishThermalUnit -> ShowS # show :: BritishThermalUnit -> String # showList :: [BritishThermalUnit] -> ShowS # | |
Unit BritishThermalUnit Source # | |
Defined in Data.Units.Imperial.Misc Associated Types type BaseUnit BritishThermalUnit # type DimOfUnit BritishThermalUnit # type UnitFactorsOf BritishThermalUnit :: [Factor Type] # Methods | |
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 #
Constructors
Horsepower |
Instances
Show Horsepower Source # | |
Defined in Data.Units.Imperial.Misc Methods showsPrec :: Int -> Horsepower -> ShowS # show :: Horsepower -> String # showList :: [Horsepower] -> ShowS # | |
Unit Horsepower Source # | |
Defined in Data.Units.Imperial.Misc Associated Types 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 #
Constructors
Fahrenheit |
Instances
Show Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc Methods showsPrec :: Int -> Fahrenheit -> ShowS # show :: Fahrenheit -> String # showList :: [Fahrenheit] -> ShowS # | |
Unit Fahrenheit Source # | |
Defined in Data.Units.Imperial.Misc Associated Types 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 |