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 liquid volume measures as used in the USA. Note that liquid volumes in the USA differ both from solid volumes in the USA and from liquid volumes in the UK.
Included are all units mentioned here: http://en.wikipedia.org/wiki/United_States_customary_units Where possible, conversion rates have been independently verified at a US government website. However, Wikipedia's base is much better organized than any government resource immediately available. The US government references used are as follows: http://nist.gov/pml/wmd/metric/upload/SP1038.pdf http://nist.gov/pml/wmd/pubs/upload/appc-14-hb44-final.pdf
Synopsis
- data Gallon = Gallon
- data FluidOunce = FluidOunce
- data Gill = Gill
- data Cup = Cup
- data Pint = Pint
- data Quart = Quart
- data Teaspoon = Teaspoon
- data Tablespoon = Tablespoon
- data Shot = Shot
- data Minim = Minim
- data Dram = Dram
- data Hogshead = Hogshead
- data Barrel = Barrel
- data OilBarrel = OilBarrel
- commonLiquidMeasures :: [Name]
- otherLiquidMeasures :: [Name]
Documentation
Instances
Show Gallon Source # | |
Unit Gallon Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Gallon -> Rational # canonicalConvRatio :: Gallon -> Rational | |
type UnitFactorsOf Gallon Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf Gallon = If (IsCanonical Gallon) '['F Gallon One] (UnitFactorsOf (BaseUnit Gallon)) | |
type DimOfUnit Gallon Source # | |
type BaseUnit Gallon Source # | |
data FluidOunce Source #
Instances
Show FluidOunce Source # | |
Defined in Data.Units.US.Liquid showsPrec :: Int -> FluidOunce -> ShowS # show :: FluidOunce -> String # showList :: [FluidOunce] -> ShowS # | |
Unit FluidOunce Source # | |
Defined in Data.Units.US.Liquid type BaseUnit FluidOunce # type DimOfUnit FluidOunce # type UnitFactorsOf FluidOunce :: [Factor Type] # | |
type UnitFactorsOf FluidOunce Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf FluidOunce = If (IsCanonical FluidOunce) '['F FluidOunce One] (UnitFactorsOf (BaseUnit FluidOunce)) | |
type DimOfUnit FluidOunce Source # | |
Defined in Data.Units.US.Liquid | |
type BaseUnit FluidOunce Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Gill Source # | |
Unit Gill Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Gill -> Rational # canonicalConvRatio :: Gill -> Rational | |
type UnitFactorsOf Gill Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Gill Source # | |
type BaseUnit Gill Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Cup Source # | |
Unit Cup Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Cup -> Rational # canonicalConvRatio :: Cup -> Rational | |
type UnitFactorsOf Cup Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Cup Source # | |
type BaseUnit Cup Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Pint Source # | |
Unit Pint Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Pint -> Rational # canonicalConvRatio :: Pint -> Rational | |
type UnitFactorsOf Pint Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Pint Source # | |
type BaseUnit Pint Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Quart Source # | |
Unit Quart Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Quart -> Rational # canonicalConvRatio :: Quart -> Rational | |
type UnitFactorsOf Quart Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Quart Source # | |
type BaseUnit Quart Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Teaspoon Source # | |
Unit Teaspoon Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Teaspoon -> Rational # | |
type UnitFactorsOf Teaspoon Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf Teaspoon = If (IsCanonical Teaspoon) '['F Teaspoon One] (UnitFactorsOf (BaseUnit Teaspoon)) | |
type DimOfUnit Teaspoon Source # | |
type BaseUnit Teaspoon Source # | |
Defined in Data.Units.US.Liquid |
data Tablespoon Source #
Instances
Show Tablespoon Source # | |
Defined in Data.Units.US.Liquid showsPrec :: Int -> Tablespoon -> ShowS # show :: Tablespoon -> String # showList :: [Tablespoon] -> ShowS # | |
Unit Tablespoon Source # | |
Defined in Data.Units.US.Liquid type BaseUnit Tablespoon # type DimOfUnit Tablespoon # type UnitFactorsOf Tablespoon :: [Factor Type] # | |
type UnitFactorsOf Tablespoon Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf Tablespoon = If (IsCanonical Tablespoon) '['F Tablespoon One] (UnitFactorsOf (BaseUnit Tablespoon)) | |
type DimOfUnit Tablespoon Source # | |
Defined in Data.Units.US.Liquid | |
type BaseUnit Tablespoon Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Shot Source # | |
Unit Shot Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Shot -> Rational # canonicalConvRatio :: Shot -> Rational | |
type UnitFactorsOf Shot Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Shot Source # | |
type BaseUnit Shot Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Minim Source # | |
Unit Minim Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Minim -> Rational # canonicalConvRatio :: Minim -> Rational | |
type UnitFactorsOf Minim Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Minim Source # | |
type BaseUnit Minim Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Dram Source # | |
Unit Dram Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Dram -> Rational # canonicalConvRatio :: Dram -> Rational | |
type UnitFactorsOf Dram Source # | |
Defined in Data.Units.US.Liquid | |
type DimOfUnit Dram Source # | |
type BaseUnit Dram Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Hogshead Source # | |
Unit Hogshead Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Hogshead -> Rational # | |
type UnitFactorsOf Hogshead Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf Hogshead = If (IsCanonical Hogshead) '['F Hogshead One] (UnitFactorsOf (BaseUnit Hogshead)) | |
type DimOfUnit Hogshead Source # | |
type BaseUnit Hogshead Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show Barrel Source # | |
Unit Barrel Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: Barrel -> Rational # canonicalConvRatio :: Barrel -> Rational | |
type UnitFactorsOf Barrel Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf Barrel = If (IsCanonical Barrel) '['F Barrel One] (UnitFactorsOf (BaseUnit Barrel)) | |
type DimOfUnit Barrel Source # | |
type BaseUnit Barrel Source # | |
Defined in Data.Units.US.Liquid |
Instances
Show OilBarrel Source # | |
Unit OilBarrel Source # | |
Defined in Data.Units.US.Liquid conversionRatio :: OilBarrel -> Rational # | |
type UnitFactorsOf OilBarrel Source # | |
Defined in Data.Units.US.Liquid type UnitFactorsOf OilBarrel = If (IsCanonical OilBarrel) '['F OilBarrel One] (UnitFactorsOf (BaseUnit OilBarrel)) | |
type DimOfUnit OilBarrel Source # | |
type BaseUnit OilBarrel Source # | |
Defined in Data.Units.US.Liquid |
commonLiquidMeasures :: [Name] Source #
As shown on Wikipedia: http://en.wikipedia.org/wiki/United_States_customary_units
otherLiquidMeasures :: [Name] Source #
Includes the rest of the measures in this file.