    {-# LANGUAGE DataKinds #-}
    {-# LANGUAGE RankNTypes #-}

    {- |
       Copyright  : Copyright (C) 2006-2018 Bjorn Buckwalter
       License    : BSD3

       Maintainer : bjorn@buckwalter.se
       Stability  : Stable
       Portability: GHC only

    = Summary

    This module defines the SI prefixes, the SI base units and the SI
    derived units. It also defines the units outside of the SI that are
    accepted for use with the SI. Any chapters, sections or tables
    referenced are from <#note1 [1]> unless otherwise specified.

    = References

    1. #note1# https://www.nist.gov/pml/special-publication-811
    2. #note2# https://en.wikipedia.org/wiki/Minute_of_arc
    3. #note3# https://en.wikipedia.org/wiki/Astronomical_unit

    -}

    module Numeric.Units.Dimensional.SIUnits
    (
      -- * SI Base Units
      -- $base-units
      metre, meter, gram, second, ampere, kelvin, mole, candela,
      -- * SI Derived Units
      -- $derived-units
      radian, steradian, hertz, newton, pascal, joule, watt, coulomb, volt, farad, ohm, siemens, weber, tesla, henry, lumen, lux,
      -- ** Celsius Temperature
      -- $celsius
      degreeCelsius, fromDegreeCelsiusAbsolute, toDegreeCelsiusAbsolute,
      -- ** Units Admitted for Reasons of Safeguarding Human Health
      -- $health
      becquerel, gray, sievert, katal,
      -- * Units Accepted for Use with the SI
      -- $accepted-units
      minute, hour, day,
      hectare, litre, liter, tonne, metricTon,
      -- ** Units of Plane Angle
      -- $arc-units
      degree, arcminute, arcsecond,
      -- $arc-units-alternate
      degreeOfArc, minuteOfArc, secondOfArc,
      -- ** Units Formerly Defined By Experiment
      -- $values-obtained-experimentally
      astronomicalUnit,
      -- * SI Prefixes
      -- $multiples
      deka, deca, hecto, kilo, mega, giga, tera, peta, exa, zetta, yotta,
      -- $submultiples
      deci, centi, milli, micro, nano, pico, femto, atto, zepto, yocto,
      -- $reified-prefixes
      Prefix, applyPrefix, siPrefixes
    )
    where

    import Data.Ratio
    import Numeric.Units.Dimensional
    import Numeric.Units.Dimensional.Quantities
    import Numeric.Units.Dimensional.UnitNames (Prefix, siPrefixes)
    import qualified Numeric.Units.Dimensional.UnitNames as N
    import Numeric.Units.Dimensional.UnitNames.Internal (ucum, ucumMetric)
    import qualified Numeric.Units.Dimensional.UnitNames.Internal as I
    import Numeric.NumType.DK.Integers ( pos3 )
    import Prelude ( Eq(..), ($), Num, Fractional, Floating, otherwise, error)
    import qualified Prelude

    {- $multiples
    Prefixes are used to form decimal multiples and submultiples of SI
    Units as described in section 4.4.

    By defining SI prefixes as functions applied to a 'Unit' we satisfy
    section 6.2.6 "Unacceptability of stand-alone prefixes".

    We define all SI prefixes from Table 5. Multiples first.
    -}

    applyMultiple :: (Num a) => Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple :: forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    p Unit 'Metric d a
    u | Ratio Integer -> Integer
    forall a. Ratio a -> a
    denominator Ratio Integer
    x Integer -> Integer -> Bool
    forall a. Eq a => a -> a -> Bool
    == Integer
    1 = UnitName 'NonMetric
    -> Integer -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'NonMetric
    n' (Ratio Integer -> Integer
    forall a. Ratio a -> a
    numerator Ratio Integer
    x) Unit 'Metric d a
    u
                      | Bool
    otherwise = [Char] -> Unit 'NonMetric d a
    forall a. HasCallStack => [Char] -> a
    error [Char]
    "Attempt to apply a submultiple prefix as a multiple."
      where
        n' :: UnitName 'NonMetric
    n' = Prefix -> UnitName 'Metric -> UnitName 'NonMetric
    N.applyPrefix Prefix
    p (Unit 'Metric d a -> UnitName 'Metric
    forall (m :: Metricality) (d :: Dimension) a.
    Unit m d a -> UnitName m
    name Unit 'Metric d a
    u)
        x :: Ratio Integer
    x = Prefix -> Ratio Integer
    N.scaleFactor Prefix
    p

    deca, deka, hecto, kilo, mega, giga, tera, peta, exa, zetta, yotta
      :: Num a => Unit 'Metric d a -> Unit 'NonMetric d a
    -- | The "deca" prefix, denoting a factor of 10.
    deca :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    deca  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.deca -- International English.
    -- | An alias for 'deca'.
    deka :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    deka  = Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    deca      -- American English.
    -- | The "hecto" prefix, denoting a factor of 100.
    hecto :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    hecto = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.hecto
    -- | The "kilo" prefix, denoting a factor of 1000.
    kilo :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    kilo  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.kilo
    -- | The "mega" prefix, denoting a factor of 10^6.
    mega :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    mega  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.mega
    -- | The "giga" prefix, denoting a factor of 10^9.
    giga :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    giga  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.giga
    -- | The "tera" prefix, denoting a factor of 10^12.
    tera :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    tera  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.tera
    -- | The "peta" prefix, denoting a factor of 10^15.
    peta :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    peta  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.peta
    -- | The "exa" prefix, denoting a factor of 10^18.
    exa :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    exa   = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.exa
    -- | The "zetta" prefix, denoting a factor of 10^21.
    zetta :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    zetta = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.zetta
    -- | The "yotta" prefix, denoting a factor of 10^24.
    yotta :: forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    yotta = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Num a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyMultiple Prefix
    I.yotta

    {- $submultiples
    Then the submultiples.
    -}

    -- | Apply a 'Prefix' to a metric 'Unit'.
    applyPrefix :: (Fractional a) => Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix :: forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    p Unit 'Metric d a
    u = UnitName 'NonMetric
    -> Ratio Integer -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Fractional a =>
    UnitName m -> Ratio Integer -> Unit m1 d a -> Unit m d a
    mkUnitQ UnitName 'NonMetric
    n' Ratio Integer
    x Unit 'Metric d a
    u
      where
        n' :: UnitName 'NonMetric
    n' = Prefix -> UnitName 'Metric -> UnitName 'NonMetric
    N.applyPrefix Prefix
    p (Unit 'Metric d a -> UnitName 'Metric
    forall (m :: Metricality) (d :: Dimension) a.
    Unit m d a -> UnitName m
    name Unit 'Metric d a
    u)
        x :: Ratio Integer
    x = Prefix -> Ratio Integer
    N.scaleFactor Prefix
    p

    deci, centi, milli, micro, nano, pico, femto, atto, zepto, yocto
      :: Fractional a => Unit 'Metric d a -> Unit 'NonMetric d a
    -- | The "deci" prefix, denoting a factor of 0.1.
    deci :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    deci  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.deci
    -- | The "centi" prefix, denoting a factor of 0.01.
    centi :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    centi = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.centi
    -- | The "milli" prefix, denoting a factor of 0.001.
    milli :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    milli = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.milli
    -- | The "micro" prefix, denoting a factor of 10^-6.
    micro :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    micro = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.micro
    -- | The "nano" prefix, denoting a factor of 10^-9.
    nano :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    nano  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.nano
    -- | The "pico" prefix, denoting a factor of 10^-12.
    pico :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    pico  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.pico
    -- | The "femto" prefix, denoting a factor of 10^-15.
    femto :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    femto = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.femto
    -- | The "atto" prefix, denoting a factor of 10^-18.
    atto :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    atto  = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.atto
    -- | The "zepto" prefix, denoting a factor of 10^-21.
    zepto :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    zepto = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.zepto
    -- | The "yocto" prefix, denoting a factor of 10^-24.
    yocto :: forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    yocto = Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    forall a (d :: Dimension).
    Fractional a =>
    Prefix -> Unit 'Metric d a -> Unit 'NonMetric d a
    applyPrefix Prefix
    I.yocto

    {- $reified-prefixes

    We supply an explicit representation of an SI prefix, along with a function to apply one and a
    list of all prefixes defined by the SI.

    -}

    {- $base-units
    These are the base units from section 4.1. To avoid a
    myriad of one-letter functions that would doubtlessly cause clashes
    and frustration in users' code, we spell out all unit names in full,
    as we did for prefixes. We also elect to spell the unit names in
    singular form, as allowed by section 9.7 "Other spelling conventions".

    We define the SI base units in the order of table 1.
    -}

    metre, meter :: Num a => Unit 'Metric DLength a
    metre :: forall a. Num a => Unit 'Metric DLength a
    metre = UnitName 'Metric
    -> Integer -> Unit 'NonMetric DLength a -> Unit 'Metric DLength a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'Metric
    I.nMeter Integer
    1 Unit 'NonMetric DLength a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit -- International English.
    meter :: forall a. Num a => Unit 'Metric DLength a
    meter = Unit 'Metric DLength a
    forall a. Num a => Unit 'Metric DLength a
    metre         -- American English.

    {-

    For mass the SI base unit is kilogram. For sensible prefixes we
    define gram here (see section 6.2.7 "Prefixes and the kilogram").
    The drawback is that we are forced to use 'Fractional'.

    -}

    gram    :: Fractional a => Unit 'Metric DMass a
    gram :: forall a. Fractional a => Unit 'Metric DMass a
    gram    = UnitName 'Metric
    -> Ratio Integer -> Unit 'NonMetric DMass a -> Unit 'Metric DMass a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Fractional a =>
    UnitName m -> Ratio Integer -> Unit m1 d a -> Unit m d a
    mkUnitQ UnitName 'Metric
    I.nGram Ratio Integer
    1e-3 Unit 'NonMetric DMass a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    second  :: Num a => Unit 'Metric DTime a
    second :: forall a. Num a => Unit 'Metric DTime a
    second  = UnitName 'Metric
    -> Integer -> Unit 'NonMetric DTime a -> Unit 'Metric DTime a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'Metric
    I.nSecond Integer
    1 Unit 'NonMetric DTime a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    ampere  :: Num a => Unit 'Metric DElectricCurrent a
    ampere :: forall a. Num a => Unit 'Metric DElectricCurrent a
    ampere  = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DElectricCurrent a
    -> Unit 'Metric DElectricCurrent a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'Metric
    I.nAmpere Integer
    1 Unit 'NonMetric DElectricCurrent a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    kelvin  :: Num a => Unit 'Metric DThermodynamicTemperature a
    kelvin :: forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    kelvin  = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DThermodynamicTemperature a
    -> Unit 'Metric DThermodynamicTemperature a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'Metric
    I.nKelvin Integer
    1 Unit 'NonMetric DThermodynamicTemperature a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    mole    :: Num a => Unit 'Metric DAmountOfSubstance a
    mole :: forall a. Num a => Unit 'Metric DAmountOfSubstance a
    mole    = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DAmountOfSubstance a
    -> Unit 'Metric DAmountOfSubstance a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'Metric
    I.nMole Integer
    1 Unit 'NonMetric DAmountOfSubstance a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    candela :: Num a => Unit 'Metric DLuminousIntensity a
    candela :: forall a. Num a => Unit 'Metric DLuminousIntensity a
    candela = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DLuminousIntensity a
    -> Unit 'Metric DLuminousIntensity a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ UnitName 'Metric
    I.nCandela Integer
    1 Unit 'NonMetric DLuminousIntensity a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit

    {- $derived-units
    From Table 3, SI derived units with special names and symbols, including the
    radian and steradian.
    -}

    radian :: Num a => Unit 'Metric DPlaneAngle a
    radian :: forall a. Num a => Unit 'Metric DPlaneAngle a
    radian = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DPlaneAngle a
    -> Unit 'Metric DPlaneAngle a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "rad" [Char]
    "rad" [Char]
    "radian") Integer
    1 Unit 'NonMetric DPlaneAngle a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit -- meter * meter ^ neg1
    steradian :: Num a => Unit 'Metric DSolidAngle a
    steradian :: forall a. Num a => Unit 'Metric DPlaneAngle a
    steradian = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DPlaneAngle a
    -> Unit 'Metric DPlaneAngle a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "sr" [Char]
    "sr" [Char]
    "steradian") Integer
    1 Unit 'NonMetric DPlaneAngle a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit -- meter ^ pos2 * meter ^ neg2
    hertz :: Num a => Unit 'Metric DFrequency a
    hertz :: forall a. Num a => Unit 'Metric DFrequency a
    hertz = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DFrequency a
    -> Unit 'Metric DFrequency a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Hz" [Char]
    "Hz" [Char]
    "Hertz") Integer
    1 (Unit 'NonMetric DFrequency a -> Unit 'Metric DFrequency a)
    -> Unit 'NonMetric DFrequency a -> Unit 'Metric DFrequency a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DFrequency a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    newton :: Num a => Unit 'Metric DForce a
    newton :: forall a. Num a => Unit 'Metric DForce a
    newton = UnitName 'Metric
    -> Integer -> Unit 'NonMetric DForce a -> Unit 'Metric DForce a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "N" [Char]
    "N" [Char]
    "Newton") Integer
    1 (Unit 'NonMetric DForce a -> Unit 'Metric DForce a)
    -> Unit 'NonMetric DForce a -> Unit 'Metric DForce a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DForce a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    pascal :: Num a => Unit 'Metric DPressure a
    pascal :: forall a. Num a => Unit 'Metric DPressure a
    pascal = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DPressure a
    -> Unit 'Metric DPressure a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Pa" [Char]
    "Pa" [Char]
    "Pascal") Integer
    1 (Unit 'NonMetric DPressure a -> Unit 'Metric DPressure a)
    -> Unit 'NonMetric DPressure a -> Unit 'Metric DPressure a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DPressure a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    joule :: Num a => Unit 'Metric DEnergy a
    joule :: forall a. Num a => Unit 'Metric DEnergy a
    joule = UnitName 'Metric
    -> Integer -> Unit 'NonMetric DEnergy a -> Unit 'Metric DEnergy a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "J" [Char]
    "J" [Char]
    "Joule") Integer
    1 (Unit 'NonMetric DEnergy a -> Unit 'Metric DEnergy a)
    -> Unit 'NonMetric DEnergy a -> Unit 'Metric DEnergy a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DEnergy a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    watt :: Num a => Unit 'Metric DPower a
    watt :: forall a. Num a => Unit 'Metric DPower a
    watt = UnitName 'Metric
    -> Integer -> Unit 'NonMetric DPower a -> Unit 'Metric DPower a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "W" [Char]
    "W" [Char]
    "Watt") Integer
    1 (Unit 'NonMetric DPower a -> Unit 'Metric DPower a)
    -> Unit 'NonMetric DPower a -> Unit 'Metric DPower a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DPower a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    coulomb :: Num a => Unit 'Metric DElectricCharge a
    coulomb :: forall a. Num a => Unit 'Metric DElectricCharge a
    coulomb = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DElectricCharge a
    -> Unit 'Metric DElectricCharge a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "C" [Char]
    "C" [Char]
    "Coulomb") Integer
    1 (Unit 'NonMetric DElectricCharge a
     -> Unit 'Metric DElectricCharge a)
    -> Unit 'NonMetric DElectricCharge a
    -> Unit 'Metric DElectricCharge a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DElectricCharge a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    volt :: Num a => Unit 'Metric DElectricPotential a
    volt :: forall a. Num a => Unit 'Metric DElectricPotential a
    volt = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DElectricPotential a
    -> Unit 'Metric DElectricPotential a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "V" [Char]
    "V" [Char]
    "Volt") Integer
    1 (Unit 'NonMetric DElectricPotential a
     -> Unit 'Metric DElectricPotential a)
    -> Unit 'NonMetric DElectricPotential a
    -> Unit 'Metric DElectricPotential a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DElectricPotential a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    farad :: Num a => Unit 'Metric DCapacitance a
    farad :: forall a. Num a => Unit 'Metric DCapacitance a
    farad = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DCapacitance a
    -> Unit 'Metric DCapacitance a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "F" [Char]
    "F" [Char]
    "Farad") Integer
    1 (Unit 'NonMetric DCapacitance a -> Unit 'Metric DCapacitance a)
    -> Unit 'NonMetric DCapacitance a -> Unit 'Metric DCapacitance a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DCapacitance a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    ohm :: Num a => Unit 'Metric DElectricResistance a
    ohm :: forall a. Num a => Unit 'Metric DElectricResistance a
    ohm = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DElectricResistance a
    -> Unit 'Metric DElectricResistance a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Ohm" [Char]
    "Ω" [Char]
    "Ohm") Integer
    1 (Unit 'NonMetric DElectricResistance a
     -> Unit 'Metric DElectricResistance a)
    -> Unit 'NonMetric DElectricResistance a
    -> Unit 'Metric DElectricResistance a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DElectricResistance a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    siemens :: Num a => Unit 'Metric DElectricConductance a
    siemens :: forall a. Num a => Unit 'Metric DElectricConductance a
    siemens = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DElectricConductance a
    -> Unit 'Metric DElectricConductance a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "S" [Char]
    "S" [Char]
    "Siemens") Integer
    1 (Unit 'NonMetric DElectricConductance a
     -> Unit 'Metric DElectricConductance a)
    -> Unit 'NonMetric DElectricConductance a
    -> Unit 'Metric DElectricConductance a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DElectricConductance a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    weber :: Num a => Unit 'Metric DMagneticFlux a
    weber :: forall a. Num a => Unit 'Metric DMagneticFlux a
    weber = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DMagneticFlux a
    -> Unit 'Metric DMagneticFlux a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Wb" [Char]
    "Wb" [Char]
    "Weber") Integer
    1 (Unit 'NonMetric DMagneticFlux a -> Unit 'Metric DMagneticFlux a)
    -> Unit 'NonMetric DMagneticFlux a -> Unit 'Metric DMagneticFlux a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DMagneticFlux a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    tesla :: Num a => Unit 'Metric DMagneticFluxDensity a
    tesla :: forall a. Num a => Unit 'Metric DMagneticFluxDensity a
    tesla = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DMagneticFluxDensity a
    -> Unit 'Metric DMagneticFluxDensity a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "T" [Char]
    "T" [Char]
    "Tesla") Integer
    1 (Unit 'NonMetric DMagneticFluxDensity a
     -> Unit 'Metric DMagneticFluxDensity a)
    -> Unit 'NonMetric DMagneticFluxDensity a
    -> Unit 'Metric DMagneticFluxDensity a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DMagneticFluxDensity a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    henry :: Num a => Unit 'Metric DInductance a
    henry :: forall a. Num a => Unit 'Metric DInductance a
    henry = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DInductance a
    -> Unit 'Metric DInductance a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "H" [Char]
    "H" [Char]
    "Henry") Integer
    1 (Unit 'NonMetric DInductance a -> Unit 'Metric DInductance a)
    -> Unit 'NonMetric DInductance a -> Unit 'Metric DInductance a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DInductance a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit

    {-
    We defer the definition of Celcius temperature to another section (would
    appear here if we stricly followed table 3).
    -}

    lumen :: Num a => Unit 'Metric DLuminousFlux a
    lumen :: forall a. Num a => Unit 'Metric DLuminousIntensity a
    lumen = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DLuminousIntensity a
    -> Unit 'Metric DLuminousIntensity a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "lm" [Char]
    "lm" [Char]
    "lumen") Integer
    1 (Unit 'NonMetric DLuminousIntensity a
     -> Unit 'Metric DLuminousIntensity a)
    -> Unit 'NonMetric DLuminousIntensity a
    -> Unit 'Metric DLuminousIntensity a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DLuminousIntensity a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    lux :: Num a => Unit 'Metric DIlluminance a
    lux :: forall a. Num a => Unit 'Metric DIlluminance a
    lux = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DIlluminance a
    -> Unit 'Metric DIlluminance a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "lx" [Char]
    "lx" [Char]
    "lux") Integer
    1 (Unit 'NonMetric DIlluminance a -> Unit 'Metric DIlluminance a)
    -> Unit 'NonMetric DIlluminance a -> Unit 'Metric DIlluminance a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DIlluminance a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit

    {- $celsius
    A problematic area is units which increase proportionally to the
    base SI units but cross zero at a different point. An example would
    be degrees Celsius (see section 4.2.1.1). The author feels that it
    is appropriate to define a unit for use with relative quantities
    (taking only into account the proportionality) and complement the
    unit with functions for converting absolute values.

    The function 'fromDegreeCelsiusAbsolute' should be used in lieu of
    "*~ degreeCelsius" when working with absolute temperatures. Similarily,
    'toDegreeCelsiusAbsolute' should be used in lieu of "/~ degreeCelsius"
    when working with absolute temperatures.
    -}

    degreeCelsius :: Num a => Unit 'Metric DCelsiusTemperature a
    degreeCelsius :: forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    degreeCelsius = Unit 'Metric DThermodynamicTemperature a
    forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    kelvin

    fromDegreeCelsiusAbsolute :: Floating a => a -> ThermodynamicTemperature a
    fromDegreeCelsiusAbsolute :: forall a. Floating a => a -> ThermodynamicTemperature a
    fromDegreeCelsiusAbsolute a
    x = a
    x a
    -> Unit 'Metric DThermodynamicTemperature a
    -> Quantity DThermodynamicTemperature a
    forall a (m :: Metricality) (d :: Dimension).
    Num a =>
    a -> Unit m d a -> Quantity d a
    *~ Unit 'Metric DThermodynamicTemperature a
    forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    degreeCelsius Quantity DThermodynamicTemperature a
    -> Quantity DThermodynamicTemperature a
    -> Quantity DThermodynamicTemperature a
    forall a (d :: Dimension).
    Num a =>
    Quantity d a -> Quantity d a -> Quantity d a
    + a
    273.15 a
    -> Unit 'Metric DThermodynamicTemperature a
    -> Quantity DThermodynamicTemperature a
    forall a (m :: Metricality) (d :: Dimension).
    Num a =>
    a -> Unit m d a -> Quantity d a
    *~ Unit 'Metric DThermodynamicTemperature a
    forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    degreeCelsius
    toDegreeCelsiusAbsolute :: Floating a => ThermodynamicTemperature a -> a
    toDegreeCelsiusAbsolute :: forall a. Floating a => ThermodynamicTemperature a -> a
    toDegreeCelsiusAbsolute ThermodynamicTemperature a
    x = (ThermodynamicTemperature a
    x ThermodynamicTemperature a
    -> ThermodynamicTemperature a -> ThermodynamicTemperature a
    forall a (d :: Dimension).
    Num a =>
    Quantity d a -> Quantity d a -> Quantity d a
    - a
    273.15 a
    -> Unit 'Metric DThermodynamicTemperature a
    -> ThermodynamicTemperature a
    forall a (m :: Metricality) (d :: Dimension).
    Num a =>
    a -> Unit m d a -> Quantity d a
    *~ Unit 'Metric DThermodynamicTemperature a
    forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    degreeCelsius) ThermodynamicTemperature a
    -> Unit 'Metric DThermodynamicTemperature a -> a
    forall a (d :: Dimension) (m :: Metricality).
    Fractional a =>
    Quantity d a -> Unit m d a -> a
    /~ Unit 'Metric DThermodynamicTemperature a
    forall a. Num a => Unit 'Metric DThermodynamicTemperature a
    degreeCelsius

    {- $health

    The last units from Table 3 are SI derived units with special names and symbols admitted for reasons
    of safeguarding human health.
    -}

    becquerel :: Num a => Unit 'Metric DActivity a
    becquerel :: forall a. Num a => Unit 'Metric DFrequency a
    becquerel = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DFrequency a
    -> Unit 'Metric DFrequency a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Bq" [Char]
    "Bq" [Char]
    "Becquerel") Integer
    1 (Unit 'NonMetric DFrequency a -> Unit 'Metric DFrequency a)
    -> Unit 'NonMetric DFrequency a -> Unit 'Metric DFrequency a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DFrequency a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    gray :: Num a => Unit 'Metric DAbsorbedDose a
    gray :: forall a. Num a => Unit 'Metric DAbsorbedDose a
    gray = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DAbsorbedDose a
    -> Unit 'Metric DAbsorbedDose a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Gy" [Char]
    "Gy" [Char]
    "Gray") Integer
    1 (Unit 'NonMetric DAbsorbedDose a -> Unit 'Metric DAbsorbedDose a)
    -> Unit 'NonMetric DAbsorbedDose a -> Unit 'Metric DAbsorbedDose a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DAbsorbedDose a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    sievert :: Num a => Unit 'Metric DDoseEquivalent a
    sievert :: forall a. Num a => Unit 'Metric DAbsorbedDose a
    sievert = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DAbsorbedDose a
    -> Unit 'Metric DAbsorbedDose a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "Sv" [Char]
    "Sv" [Char]
    "Sievert") Integer
    1 (Unit 'NonMetric DAbsorbedDose a -> Unit 'Metric DAbsorbedDose a)
    -> Unit 'NonMetric DAbsorbedDose a -> Unit 'Metric DAbsorbedDose a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DAbsorbedDose a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit
    katal :: Num a => Unit 'Metric DCatalyticActivity a
    katal :: forall a. Num a => Unit 'Metric DCatalyticActivity a
    katal = UnitName 'Metric
    -> Integer
    -> Unit 'NonMetric DCatalyticActivity a
    -> Unit 'Metric DCatalyticActivity a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "kat" [Char]
    "kat" [Char]
    "katal") Integer
    1 (Unit 'NonMetric DCatalyticActivity a
     -> Unit 'Metric DCatalyticActivity a)
    -> Unit 'NonMetric DCatalyticActivity a
    -> Unit 'Metric DCatalyticActivity a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DCatalyticActivity a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit

    {- $accepted-units
    There are several units that are not strictly part of the SI but
    are either permanently or temporarily accepted for use with the SI.
    We define the permanently accepted ones in this module.

    From Table 6, Units accepted for use with the SI.

    We start with time which we grant exclusive rights to 'minute' and
    'second'.
    -}
    minute, hour, day :: Num a => Unit 'NonMetric DTime a
    minute :: forall a. Num a => Unit 'NonMetric DTime a
    minute = UnitName 'NonMetric
    -> Integer -> Unit 'Metric DTime a -> Unit 'NonMetric DTime a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "min" [Char]
    "min" [Char]
    "minute") Integer
    60 (Unit 'Metric DTime a -> Unit 'NonMetric DTime a)
    -> Unit 'Metric DTime a -> Unit 'NonMetric DTime a
    forall a b. (a -> b) -> a -> b
    $ Unit 'Metric DTime a
    forall a. Num a => Unit 'Metric DTime a
    second
    hour :: forall a. Num a => Unit 'NonMetric DTime a
    hour   = UnitName 'NonMetric
    -> Integer -> Unit 'NonMetric DTime a -> Unit 'NonMetric DTime a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "h" [Char]
    "h" [Char]
    "hour")       Integer
    60 (Unit 'NonMetric DTime a -> Unit 'NonMetric DTime a)
    -> Unit 'NonMetric DTime a -> Unit 'NonMetric DTime a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DTime a
    forall a. Num a => Unit 'NonMetric DTime a
    minute
    day :: forall a. Num a => Unit 'NonMetric DTime a
    day    = UnitName 'NonMetric
    -> Integer -> Unit 'NonMetric DTime a -> Unit 'NonMetric DTime a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "d" [Char]
    "d" [Char]
    "day")        Integer
    24 (Unit 'NonMetric DTime a -> Unit 'NonMetric DTime a)
    -> Unit 'NonMetric DTime a -> Unit 'NonMetric DTime a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DTime a
    forall a. Num a => Unit 'NonMetric DTime a
    hour -- Mean solar day.

    {- $arc-units

    Since 'minute' and 'second' are already in use for time we use
    'arcminute' and 'arcsecond' <#note2 [2]> for plane angle instead.
    -}

    degree, arcminute, arcsecond :: Floating a => Unit 'NonMetric DPlaneAngle a
    degree :: forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    degree    = UnitName 'NonMetric
    -> ExactPi
    -> Unit 'Metric DPlaneAngle a
    -> Unit 'NonMetric DPlaneAngle a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Floating a =>
    UnitName m -> ExactPi -> Unit m1 d a -> Unit m d a
    mkUnitR ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "deg" [Char]
    "°" [Char]
    "degree")    (ExactPi
    forall a. Floating a => a
    Prelude.pi ExactPi -> ExactPi -> ExactPi
    forall a. Fractional a => a -> a -> a
    Prelude./ ExactPi
    180) (Unit 'Metric DPlaneAngle a -> Unit 'NonMetric DPlaneAngle a)
    -> Unit 'Metric DPlaneAngle a -> Unit 'NonMetric DPlaneAngle a
    forall a b. (a -> b) -> a -> b
    $ Unit 'Metric DPlaneAngle a
    forall a. Num a => Unit 'Metric DPlaneAngle a
    radian
    arcminute :: forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    arcminute = UnitName 'NonMetric
    -> ExactPi
    -> Unit 'NonMetric DPlaneAngle a
    -> Unit 'NonMetric DPlaneAngle a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Floating a =>
    UnitName m -> ExactPi -> Unit m1 d a -> Unit m d a
    mkUnitR ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "'" [Char]
    "'" [Char]
    "arcminute")   (ExactPi -> ExactPi
    forall a. Fractional a => a -> a
    Prelude.recip ExactPi
    60)         (Unit 'NonMetric DPlaneAngle a -> Unit 'NonMetric DPlaneAngle a)
    -> Unit 'NonMetric DPlaneAngle a -> Unit 'NonMetric DPlaneAngle a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DPlaneAngle a
    forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    degreeOfArc
    arcsecond :: forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    arcsecond = UnitName 'NonMetric
    -> ExactPi
    -> Unit 'NonMetric DPlaneAngle a
    -> Unit 'NonMetric DPlaneAngle a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Floating a =>
    UnitName m -> ExactPi -> Unit m1 d a -> Unit m d a
    mkUnitR ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "''" [Char]
    "''" [Char]
    "arcsecond") (ExactPi -> ExactPi
    forall a. Fractional a => a -> a
    Prelude.recip ExactPi
    60)         (Unit 'NonMetric DPlaneAngle a -> Unit 'NonMetric DPlaneAngle a)
    -> Unit 'NonMetric DPlaneAngle a -> Unit 'NonMetric DPlaneAngle a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DPlaneAngle a
    forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    minuteOfArc

    {- $arc-units-alternate
    Alternate (longer) forms of the above. In particular 'degreeOfArc'
    can be used if there is a percieved need to disambiguate from e.g.
    temperature.
    -}

    degreeOfArc, minuteOfArc, secondOfArc :: Floating a => Unit 'NonMetric DPlaneAngle a
    degreeOfArc :: forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    degreeOfArc = Unit 'NonMetric DPlaneAngle a
    forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    degree
    secondOfArc :: forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    secondOfArc = Unit 'NonMetric DPlaneAngle a
    forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    arcsecond
    minuteOfArc :: forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    minuteOfArc = Unit 'NonMetric DPlaneAngle a
    forall a. Floating a => Unit 'NonMetric DPlaneAngle a
    arcminute

    hectare :: Fractional a => Unit 'NonMetric DArea a
    hectare :: forall a. Fractional a => Unit 'NonMetric DArea a
    hectare = Unit 'NonMetric DLength a -> Unit 'NonMetric DArea a
    forall a (m :: Metricality).
    (Fractional a, Typeable m) =>
    Unit m DLength a -> Unit 'NonMetric DArea a
    square (Unit 'Metric DLength a -> Unit 'NonMetric DLength a
    forall a (d :: Dimension).
    Num a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    hecto Unit 'Metric DLength a
    forall a. Num a => Unit 'Metric DLength a
    meter)

    litre, liter :: Fractional a => Unit 'Metric DVolume a
    litre :: forall a. Fractional a => Unit 'Metric DVolume a
    litre = UnitName 'Metric
    -> Ratio Integer
    -> Unit 'NonMetric DVolume a
    -> Unit 'Metric DVolume a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Fractional a =>
    UnitName m -> Ratio Integer -> Unit m1 d a -> Unit m d a
    mkUnitQ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "L" [Char]
    "L" [Char]
    "litre") Ratio Integer
    1 (Unit 'NonMetric DVolume a -> Unit 'Metric DVolume a)
    -> Unit 'NonMetric DVolume a -> Unit 'Metric DVolume a
    forall a b. (a -> b) -> a -> b
    $ Unit 'Metric DLength a -> Unit 'NonMetric DLength a
    forall a (d :: Dimension).
    Fractional a =>
    Unit 'Metric d a -> Unit 'NonMetric d a
    deci Unit 'Metric DLength a
    forall a. Num a => Unit 'Metric DLength a
    meter Unit 'NonMetric DLength a
    -> Proxy 'Pos3
    -> Dimensional (Weaken ('DUnit 'NonMetric)) (DLength ^ 'Pos3) a
    forall a (i :: TypeInt) (v :: Variant) (d1 :: Dimension).
    (Fractional a, KnownTypeInt i, KnownVariant v,
     KnownVariant (Weaken v)) =>
    Dimensional v d1 a -> Proxy i -> Dimensional (Weaken v) (d1 ^ i) a
    ^ Proxy 'Pos3
    pos3 -- International English.
    liter :: forall a. Fractional a => Unit 'Metric DVolume a
    liter = Unit 'Metric DVolume a
    forall a. Fractional a => Unit 'Metric DVolume a
    litre             -- American English.

    tonne, metricTon :: Num a => Unit 'Metric DMass a
    tonne :: forall a. Num a => Unit 'Metric DMass a
    tonne     = UnitName 'Metric
    -> Integer -> Unit 'NonMetric DMass a -> Unit 'Metric DMass a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'Metric
    ucumMetric [Char]
    "t" [Char]
    "t" [Char]
    "tonne") Integer
    1000 (Unit 'NonMetric DMass a -> Unit 'Metric DMass a)
    -> Unit 'NonMetric DMass a -> Unit 'Metric DMass a
    forall a b. (a -> b) -> a -> b
    $ Unit 'NonMetric DMass a
    forall (d :: Dimension) a.
    (KnownDimension d, Num a) =>
    Unit 'NonMetric d a
    siUnit -- Name in original SI text.
    metricTon :: forall a. Num a => Unit 'Metric DMass a
    metricTon = Unit 'Metric DMass a
    forall a. Num a => Unit 'Metric DMass a
    tonne                   -- American name.

    {- $values-obtained-experimentally
    We decline to provide here those units - listed in Table 7 - which,
    while accepted for use with the SI, have values which are determined experimentally.
    For versioning purposes, those units can be found in "Numeric.Units.Dimensional.NonSI".

    However, in 2012 the IAU redefined the astronomical unit as a conventional
    unit of length directly tied to the meter, with a length of exactly
    149 597 870 700 m and the official abbreviation of au <#note3 [3]>. We therefore include it here.
    -}

    astronomicalUnit :: Num a => Unit 'NonMetric DLength a
    astronomicalUnit :: forall a. Num a => Unit 'NonMetric DLength a
    astronomicalUnit = UnitName 'NonMetric
    -> Integer -> Unit 'Metric DLength a -> Unit 'NonMetric DLength a
    forall a (m :: Metricality) (m1 :: Metricality) (d :: Dimension).
    Num a =>
    UnitName m -> Integer -> Unit m1 d a -> Unit m d a
    mkUnitZ ([Char] -> [Char] -> [Char] -> UnitName 'NonMetric
    ucum [Char]
    "au" [Char]
    "au" [Char]
    "astronomical unit") Integer
    149597870700 (Unit 'Metric DLength a -> Unit 'NonMetric DLength a)
    -> Unit 'Metric DLength a -> Unit 'NonMetric DLength a
    forall a b. (a -> b) -> a -> b
    $ Unit 'Metric DLength a
    forall a. Num a => Unit 'Metric DLength a
    meter