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

Safe HaskellNone

UnitTyped.SI.Meta

Description

This module creates the SI prefixes for units. This module allows syntax like:

>>> 42 kilo meter
42.0 km

Synopsis

Documentation

data Deca a Source

Create a unit 10^1 times an existing unit.

Instances

Convertable a b => MetaUnit Deca a b 

data Hecto a Source

Create a unit 10^2 times an existing unit.

Instances

Convertable a b => MetaUnit Hecto a b 

data Kilo a Source

Create a unit 10^3 times an existing unit.

Instances

Convertable a b => MetaUnit Kilo a b 

data Mega a Source

Create a unit 10^6 times an existing unit.

Instances

Convertable a b => MetaUnit Mega a b 

data Giga a Source

Create a unit 10^9 times an existing unit.

Instances

Convertable a b => MetaUnit Giga a b 

data Tera a Source

Create a unit 10^12 times an existing unit.

Instances

Convertable a b => MetaUnit Tera a b 

data Peta a Source

Create a unit 10^15 times an existing unit.

Instances

Convertable a b => MetaUnit Peta a b 

data Exa a Source

Create a unit 10^18 times an existing unit.

Instances

Convertable a b => MetaUnit Exa a b 

data Zetta a Source

Create a unit 10^21 times an existing unit.

Instances

Convertable a b => MetaUnit Zetta a b 

data Yotta a Source

Create a unit 10^24 times an existing unit.

Instances

Convertable a b => MetaUnit Yotta a b 

data Deci a Source

Create a unit 10^-1 times an existing unit.

Instances

Convertable a b => MetaUnit Deci a b 

data Centi a Source

Create a unit 10^-2 times an existing unit.

Instances

Convertable a b => MetaUnit Centi a b 

data Mili a Source

Create a unit 10^-3 times an existing unit.

Instances

Convertable a b => MetaUnit Mili a b 

data Micro a Source

Create a unit 10^-6 times an existing unit.

Instances

Convertable a b => MetaUnit Micro a b 

data Nano a Source

Create a unit 10^-9 times an existing unit.

Instances

Convertable a b => MetaUnit Nano a b 

data Pico a Source

Create a unit 10^-12 times an existing unit.

Instances

Convertable a b => MetaUnit Pico a b 

data Femto a Source

Create a unit 10^-15 times an existing unit.

Instances

Convertable a b => MetaUnit Femto a b 

data Atto a Source

Create a unit 10^-18 times an existing unit.

Instances

Convertable a b => MetaUnit Atto a b 

data Zepto a Source

Create a unit 10^-21 times an existing unit.

Instances

Convertable a b => MetaUnit Zepto a b 

data Yocto a Source

Create a unit 10^-24 times an existing unit.

Instances

Convertable a b => MetaUnit Yocto a b 

deca :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Deca b)Source

Take a unit and return one deca(unit).

hecto :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Hecto b)Source

Take a unit and return one hecto(unit).

kilo :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Kilo b)Source

Take a unit and return one kilo(unit).

mega :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Mega b)Source

Take a unit and return one mega(unit).

giga :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Giga b)Source

Take a unit and return one giga(unit).

tera :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Tera b)Source

Take a unit and return one tera(unit).

peta :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Peta b)Source

Take a unit and return one peta(unit).

exa :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Exa b)Source

Take a unit and return one exa(unit).

zetta :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Zetta b)Source

Take a unit and return one zetta(unit).

yotta :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Yotta b)Source

Take a unit and return one yotta(unit).

deci :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Deci b)Source

Take a unit and return one deci(unit).

centi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Centi b)Source

Take a unit and return one centi(unit).

mili :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Mili b)Source

Take a unit and return one mili(unit).

micro :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Micro b)Source

Take a unit and return one micro(unit).

nano :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Nano b)Source

Take a unit and return one nano(unit).

pico :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Pico b)Source

Take a unit and return one pico(unit).

femto :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Femto b)Source

Take a unit and return one femto(unit).

atto :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Atto b)Source

Take a unit and return one atto(unit).

zepto :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Zepto b)Source

Take a unit and return one zepto(unit).

yocto :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Yocto b)Source

Take a unit and return one yocto(unit).

data Kibi a Source

Create a unit 2^10 times an existing unit.

Instances

Convertable a b => MetaUnit Kibi a b 

data Mebi a Source

Create a unit 2^20 times an existing unit.

Instances

Convertable a b => MetaUnit Mebi a b 

data Gibi a Source

Create a unit 2^30 times an existing unit.

Instances

Convertable a b => MetaUnit Gibi a b 

data Tebi a Source

Create a unit 2^40 times an existing unit.

Instances

Convertable a b => MetaUnit Tebi a b 

data Pebi a Source

Create a unit 2^50 times an existing unit.

Instances

Convertable a b => MetaUnit Pebi a b 

data Exbi a Source

Create a unit 2^60 times an existing unit.

Instances

Convertable a b => MetaUnit Exbi a b 

data Zebi a Source

Create a unit 2^70 times an existing unit.

Instances

Convertable a b => MetaUnit Zebi a b 

data Yobi a Source

Create a unit 2^80 times an existing unit.

Instances

Convertable a b => MetaUnit Yobi a b 

kibi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Kibi b)Source

Take a unit and return one kibi(unit).

mebi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Mebi b)Source

Take a unit and return one mebi(unit).

gibi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Gibi b)Source

Take a unit and return one gibi(unit).

tebi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Tebi b)Source

Take a unit and return one tebi(unit).

pebi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Pebi b)Source

Take a unit and return one pebi(unit).

exbi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Exbi b)Source

Take a unit and return one exbi(unit).

zebi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Zebi b)Source

Take a unit and return one zebi(unit).

yobi :: (Convertable a b, Fractional f) => Value f a b -> Value f a (Yobi b)Source

Take a unit and return one yobi(unit).