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

Safe HaskellNone

UnitTyped.SI

Description

Module definig all SI units and their dimensions.

Synopsis

Documentation

data Mole Source

Unit for moles. Officially, this is a SI unit, but we definite it in terms of Count.

type LengthDimension = UnitCons Length (Pos One) UnitNilSource

The dimension defining Length^1.

data Meter Source

The SI unit for Length: meter (m).

type TimeDimension = UnitCons Time (Pos One) UnitNilSource

The dimension defining Time^1.

data Second Source

The SI unit for Time: second (s).

type MassDimension = UnitCons Mass (Pos One) UnitNilSource

The dimension defining Mass^1.

data Gram Source

The SI unit for Mass is officially kilogram, but we define grams (g) here, so kilo gram will work when using Meta.

data Temperature Source

Dimension of temperature.

type TemperatureDimension = UnitCons Temperature (Pos One) UnitNilSource

The dimension defining Temperature^1.

data Kelvin Source

The SI unit for Temperature: Kelvin (K).

type CurrentDimension = UnitCons Current (Pos One) UnitNilSource

The dimension defining Current^1.

data Ampere Source

The SI unit for Current: ampere (A).

data Luminous Source

Dimension of luminous intensity.

type LuminousDimension = UnitCons Luminous (Pos One) UnitNilSource

The dimension defining Luminous^1.

data Candela Source

The SI unit for Luminous intensity: candela (cd).

count :: Fractional f => Value f NoDimension CountSource

One thing (#).

mole :: Fractional f => Value f NoDimension MoleSource

One mole (mol).

gram :: Fractional f => Value f MassDimension GramSource

One gram (g).