uom-plugin-0.2.0.1: Units of measure as a GHC typechecker plugin

Safe HaskellNone
LanguageHaskell2010

Data.UnitsOfMeasure.Defs

Description

This module exports some example definitions of base and derived units, for demonstration purposes. In the future, this is likely to change or be moved to a separate package.

Synopsis

Documentation

type family MkUnit s :: Unit Source

This type family is used for translating unit names (as type-level strings) into units. It will be Base for base units or expand the definition for derived units.

The instances displayed by Haddock are available only if Data.UnitsOfMeasure.Defs is imported.

Instances

type MkUnit "A" = Base "A" Source 
type MkUnit "C" = (*:) (MkUnit "s") (MkUnit "A") Source 
type MkUnit "F" = (/:) (MkUnit "C") (MkUnit "V") Source 
type MkUnit "Hz" = (/:) One ((^:) (MkUnit "s") 1) Source 
type MkUnit "J" = (*:) (MkUnit "N") (MkUnit "m") Source 
type MkUnit "K" = Base "K" Source 
type MkUnit "N" = (/:) ((*:) (MkUnit "kg") (MkUnit "m")) ((^:) (MkUnit "s") 2) Source 
type MkUnit "Pa" = (/:) (MkUnit "N") ((^:) (MkUnit "m") 2) Source 
type MkUnit "V" = (/:) (MkUnit "W") (MkUnit "A") Source 
type MkUnit "W" = (/:) (MkUnit "J") (MkUnit "s") Source 
type MkUnit "au" = Base "au" Source 
type MkUnit "cd" = Base "cd" Source 
type MkUnit "d" = Base "d" Source 
type MkUnit "ft" = Base "ft" Source 
type MkUnit "g" = Base "g" Source 
type MkUnit "h" = Base "h" Source 
type MkUnit "ha" = Base "ha" Source 
type MkUnit "in" = Base "in" Source 
type MkUnit "kg" = Base "kg" Source 
type MkUnit "km" = Base "km" Source 
type MkUnit "l" = Base "l" Source 
type MkUnit "m" = Base "m" Source 
type MkUnit "mi" = Base "mi" Source 
type MkUnit "min" = Base "min" Source 
type MkUnit "mol" = Base "mol" Source 
type MkUnit "mph" = (/:) (MkUnit "mi") (MkUnit "h") Source 
type MkUnit "ohm" = (/:) (MkUnit "V") (MkUnit "A") Source 
type MkUnit "rad" = Base "rad" Source 
type MkUnit "s" = Base "s" Source 
type MkUnit "sr" = Base "sr" Source 
type MkUnit "t" = Base "t" Source