unittyped-0.1: An extendable library for type-safe computations including units.

Safe HaskellNone



Units derived from the SI unit for length, and higher dimensions of length (area, volume).



data Mile Source

The international mile (mile).

data Inch Source

The international inch (in).

data Yard Source

The international yard (yd).

data Foot Source

The international foot (ft).

data Ångström Source

Ångström, length unit for atoms and molecules (Å).

data NauticalMile Source

Nautical miles (M).

type AreaUnit = UnitCons Length (Pos (Suc One)) UnitNilSource

Area: Length^2.

data Barn Source

Area, often used in nuclear physics (b).

type VolumeUnit = UnitCons Length (Pos (Suc (Suc One))) UnitNilSource

Volume: Length^3.

data Liter Source

Liter, unit of volume (L).

data Gallon Source

Gallon, unit of volume (gallon).

data FluidOunce Source

Fluid ounce, unit of volume (fl oz).

mile :: Fractional f => Value f LengthDimension MileSource

One mile (mile).

angstrom :: Fractional f => Value f LengthDimension ÅngströmSource

One ångström, for those with bad UTF-8 support (Å).

barn :: Fractional f => Value f AreaUnit BarnSource

One barn (b).

liter :: Fractional f => Value f VolumeUnit LiterSource

One liter (L).

gallon :: Fractional f => Value f VolumeUnit GallonSource

One gallon (gallon).

fluid_ounce :: Fractional f => Value f VolumeUnit FluidOunceSource

One fluid ounce (fl oz).