module UnitTyped.SI where
import UnitTyped
data Mole
instance Convertable NoDimension Mole where
factor _ = 6.0221417930e23
showunit _ _ = "mole"
data Length
type LengthDimension = UnitCons Length (Pos One) UnitNil
data Meter
instance Convertable LengthDimension Meter where
factor _ = 1
showunit _ _ = "m"
data Time
type TimeDimension = UnitCons Time (Pos One) UnitNil
data Second
instance Convertable TimeDimension Second where
factor _ = 1
showunit _ _ = "s"
data Mass
type MassDimension = UnitCons Mass (Pos One) UnitNil
data Gram
instance Convertable MassDimension Gram where
factor _ = 0.001
showunit _ _ = "g"
data Temperature
type TemperatureDimension = UnitCons Temperature (Pos One) UnitNil
data Kelvin
instance Convertable TemperatureDimension Kelvin where
factor _ = 1
showunit _ _ = "K"
data Current
type CurrentDimension = UnitCons Current (Pos One) UnitNil
data Ampere
instance Convertable CurrentDimension Ampere where
factor _ = 1
showunit _ _ = "A"
data Luminous
type LuminousDimension = UnitCons Luminous (Pos One) UnitNil
data Candela
instance Convertable LuminousDimension Candela where
factor _ = 1
showunit _ _ = "cd"
count :: (Fractional f) => Value f NoDimension Count
count = one
mole :: (Fractional f) => Value f NoDimension Mole
mole = one
meter :: (Fractional f) => Value f LengthDimension Meter
meter = one
second :: (Fractional f) => Value f TimeDimension Second
second = one
gram :: (Fractional f) => Value f MassDimension Gram
gram = one
kelvin :: (Fractional f) => Value f TemperatureDimension Kelvin
kelvin = one
ampere :: (Fractional f) => Value f CurrentDimension Ampere
ampere = one
candela :: (Fractional f) => Value f LuminousDimension Candela
candela = one