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

Safe HaskellNone
LanguageHaskell2010

Data.UnitsOfMeasure.Defs

Contents

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

Orphan instances

HasCanonicalBaseUnit "A" Source # 

Associated Types

type CanonicalBaseUnit ("A" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "A" -> Quantity Rational (Base "A" /: CanonicalBaseUnit "A") Source #

HasCanonicalBaseUnit "K" Source # 

Associated Types

type CanonicalBaseUnit ("K" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "K" -> Quantity Rational (Base "K" /: CanonicalBaseUnit "K") Source #

HasCanonicalBaseUnit "au" Source # 

Associated Types

type CanonicalBaseUnit ("au" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "au" -> Quantity Rational (Base "au" /: CanonicalBaseUnit "au") Source #

HasCanonicalBaseUnit "cd" Source # 

Associated Types

type CanonicalBaseUnit ("cd" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "cd" -> Quantity Rational (Base "cd" /: CanonicalBaseUnit "cd") Source #

HasCanonicalBaseUnit "d" Source # 

Associated Types

type CanonicalBaseUnit ("d" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "d" -> Quantity Rational (Base "d" /: CanonicalBaseUnit "d") Source #

HasCanonicalBaseUnit "ft" Source # 

Associated Types

type CanonicalBaseUnit ("ft" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "ft" -> Quantity Rational (Base "ft" /: CanonicalBaseUnit "ft") Source #

HasCanonicalBaseUnit "g" Source # 

Associated Types

type CanonicalBaseUnit ("g" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "g" -> Quantity Rational (Base "g" /: CanonicalBaseUnit "g") Source #

HasCanonicalBaseUnit "h" Source # 

Associated Types

type CanonicalBaseUnit ("h" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "h" -> Quantity Rational (Base "h" /: CanonicalBaseUnit "h") Source #

HasCanonicalBaseUnit "ha" Source # 

Associated Types

type CanonicalBaseUnit ("ha" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "ha" -> Quantity Rational (Base "ha" /: CanonicalBaseUnit "ha") Source #

HasCanonicalBaseUnit "in" Source # 

Associated Types

type CanonicalBaseUnit ("in" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "in" -> Quantity Rational (Base "in" /: CanonicalBaseUnit "in") Source #

HasCanonicalBaseUnit "kg" Source # 

Associated Types

type CanonicalBaseUnit ("kg" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "kg" -> Quantity Rational (Base "kg" /: CanonicalBaseUnit "kg") Source #

HasCanonicalBaseUnit "km" Source # 

Associated Types

type CanonicalBaseUnit ("km" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "km" -> Quantity Rational (Base "km" /: CanonicalBaseUnit "km") Source #

HasCanonicalBaseUnit "l" Source # 

Associated Types

type CanonicalBaseUnit ("l" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "l" -> Quantity Rational (Base "l" /: CanonicalBaseUnit "l") Source #

HasCanonicalBaseUnit "m" Source # 

Associated Types

type CanonicalBaseUnit ("m" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "m" -> Quantity Rational (Base "m" /: CanonicalBaseUnit "m") Source #

HasCanonicalBaseUnit "mi" Source # 

Associated Types

type CanonicalBaseUnit ("mi" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "mi" -> Quantity Rational (Base "mi" /: CanonicalBaseUnit "mi") Source #

HasCanonicalBaseUnit "min" Source # 

Associated Types

type CanonicalBaseUnit ("min" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "min" -> Quantity Rational (Base "min" /: CanonicalBaseUnit "min") Source #

HasCanonicalBaseUnit "mol" Source # 

Associated Types

type CanonicalBaseUnit ("mol" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "mol" -> Quantity Rational (Base "mol" /: CanonicalBaseUnit "mol") Source #

HasCanonicalBaseUnit "rad" Source # 

Associated Types

type CanonicalBaseUnit ("rad" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "rad" -> Quantity Rational (Base "rad" /: CanonicalBaseUnit "rad") Source #

HasCanonicalBaseUnit "s" Source # 

Associated Types

type CanonicalBaseUnit ("s" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "s" -> Quantity Rational (Base "s" /: CanonicalBaseUnit "s") Source #

HasCanonicalBaseUnit "sr" Source # 

Associated Types

type CanonicalBaseUnit ("sr" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "sr" -> Quantity Rational (Base "sr" /: CanonicalBaseUnit "sr") Source #

HasCanonicalBaseUnit "t" Source # 

Associated Types

type CanonicalBaseUnit ("t" :: Symbol) :: Unit Source #

Methods

conversionBase :: proxy "t" -> Quantity Rational (Base "t" /: CanonicalBaseUnit "t") Source #