-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Statically checked physical dimensions, implemented using type families. -- -- Dimensional is a library providing data types for performing -- arithmetic with physical quantities and units. Information about the -- physical dimensions of the quantities and units is embedded in their -- types and the validity of operations is verified by the type checker -- at compile time. The boxing and unboxing of numerical values as -- quantities is done by multiplication and division with units. The -- library is designed to, as far as is practical, enforce/encourage best -- practices of unit usage. The dimensional-tf packade differs from the -- dimensional package in that the dimension tracking is implemented -- using type families rather than functional dependencies. Requires GHC -- 7.0 or later. @package dimensional-tf @version 0.2 -- | Please refer to the literate Haskell code for documentation of both -- API and implementation. module Numeric.Units.Dimensional.TF newtype Dimensional v d a Dimensional :: a -> Dimensional v d a data DUnit data DQuantity type Unit = Dimensional DUnit type Quantity = Dimensional DQuantity (*~) :: Num a => a -> Unit d a -> Quantity d a (/~) :: Fractional a => Quantity d a -> Unit d a -> a data Dim l m t i th n j type DOne = Dim Zero Zero Zero Zero Zero Zero Zero type DLength = Dim Pos1 Zero Zero Zero Zero Zero Zero type DMass = Dim Zero Pos1 Zero Zero Zero Zero Zero type DTime = Dim Zero Zero Pos1 Zero Zero Zero Zero type DElectricCurrent = Dim Zero Zero Zero Pos1 Zero Zero Zero type DThermodynamicTemperature = Dim Zero Zero Zero Zero Pos1 Zero Zero type DAmountOfSubstance = Dim Zero Zero Zero Zero Zero Pos1 Zero type DLuminousIntensity = Dim Zero Zero Zero Zero Zero Zero Pos1 type Dimensionless = Quantity DOne type Length = Quantity DLength type Mass = Quantity DMass type Time = Quantity DTime type ElectricCurrent = Quantity DElectricCurrent type ThermodynamicTemperature = Quantity DThermodynamicTemperature type AmountOfSubstance = Quantity DAmountOfSubstance type LuminousIntensity = Quantity DLuminousIntensity (*) :: Num a => Dimensional v d a -> Dimensional v d' a -> Dimensional v (Mul d d') a (/) :: Fractional a => Dimensional v d a -> Dimensional v d' a -> Dimensional v (Div d d') a (^) :: (Fractional a, NumType n) => Dimensional v d a -> n -> Dimensional v (Pow d n) a (^+) :: (Num a, NumType n) => Dimensional v d a -> n -> Dimensional v (Pow d n) a negate :: Num a => Quantity d a -> Quantity d a (+) :: Num a => Quantity d a -> Quantity d a -> Quantity d a (-) :: Num a => Quantity d a -> Quantity d a -> Quantity d a abs :: Num a => Quantity d a -> Quantity d a nroot :: (Floating a, NumType n) => n -> Dimensional v d a -> Dimensional v (Root d n) a sqrt :: Floating a => Dimensional v d a -> Dimensional v (Root d Pos2) a cbrt :: Floating a => Dimensional v d a -> Dimensional v (Root d Pos3) a (^/) :: (Floating a, NumType n) => Dimensional v d a -> n -> Dimensional v (Root d n) a (*~~) :: (Functor f, Num a) => f a -> Unit d a -> f (Quantity d a) (/~~) :: (Functor f, Fractional a) => f (Quantity d a) -> Unit d a -> f a sum :: Num a => [Quantity d a] -> Quantity d a dimensionlessLength :: Num a => [Dimensional v d a] -> Dimensionless a exp :: Floating a => Dimensionless a -> Dimensionless a atanh :: Floating a => Dimensionless a -> Dimensionless a acosh :: Floating a => Dimensionless a -> Dimensionless a asinh :: Floating a => Dimensionless a -> Dimensionless a tanh :: Floating a => Dimensionless a -> Dimensionless a cosh :: Floating a => Dimensionless a -> Dimensionless a sinh :: Floating a => Dimensionless a -> Dimensionless a atan :: Floating a => Dimensionless a -> Dimensionless a acos :: Floating a => Dimensionless a -> Dimensionless a asin :: Floating a => Dimensionless a -> Dimensionless a tan :: Floating a => Dimensionless a -> Dimensionless a cos :: Floating a => Dimensionless a -> Dimensionless a sin :: Floating a => Dimensionless a -> Dimensionless a log :: Floating a => Dimensionless a -> Dimensionless a (**) :: Floating a => Dimensionless a -> Dimensionless a -> Dimensionless a atan2 :: RealFloat a => Quantity d a -> Quantity d a -> Dimensionless a one :: Num a => Unit DOne a _0 :: Num a => Quantity d a _1 :: Num a => Dimensionless a _9 :: Num a => Dimensionless a _8 :: Num a => Dimensionless a _7 :: Num a => Dimensionless a _6 :: Num a => Dimensionless a _5 :: Num a => Dimensionless a _4 :: Num a => Dimensionless a _3 :: Num a => Dimensionless a _2 :: Num a => Dimensionless a pi :: Floating a => Dimensionless a dimUnit :: NumType n => String -> n -> Maybe String prefix :: Num a => a -> Unit d a -> Unit d a instance Typeable3 Dimensional instance Typeable DUnit instance Typeable DQuantity instance Typeable7 Dim instance Eq a => Eq (Dimensional v d a) instance Ord a => Ord (Dimensional v d a) instance Enum a => Enum (Dimensional v d a) instance (NumType l, NumType m, NumType t, NumType i, NumType th, NumType n, NumType j) => Show (Dim l m t i th n j) instance (Show d, Show a) => Show (Quantity d a) instance Functor Dimensionless -- | Please refer to the literate Haskell code for documentation of both -- API and implementation. module Numeric.Units.Dimensional.TF.Quantities type DArea = Dim Pos2 Zero Zero Zero Zero Zero Zero type Area = Quantity DArea type DVolume = Dim Pos3 Zero Zero Zero Zero Zero Zero type Volume = Quantity DVolume type DVelocity = Dim Pos1 Zero Neg1 Zero Zero Zero Zero type Velocity = Quantity DVelocity type DAcceleration = Dim Pos1 Zero Neg2 Zero Zero Zero Zero type Acceleration = Quantity DAcceleration type DWaveNumber = Dim Neg1 Zero Zero Zero Zero Zero Zero type WaveNumber = Quantity DWaveNumber type DMassDensity = Dim Neg3 Pos1 Zero Zero Zero Zero Zero type MassDensity = Quantity DMassDensity type Density = MassDensity type DSpecificVolume = Dim Pos3 Neg1 Zero Zero Zero Zero Zero type SpecificVolume = Quantity DSpecificVolume type DCurrentDensity = Dim Neg2 Zero Zero Pos1 Zero Zero Zero type CurrentDensity = Quantity DCurrentDensity type DMagneticFieldStrength = Dim Neg1 Zero Zero Pos1 Zero Zero Zero type MagneticFieldStrength = Quantity DMagneticFieldStrength type DAmountOfSubstanceConcentration = Dim Neg3 Zero Zero Zero Zero Pos1 Zero type AmountOfSubstanceConcentration = Quantity DAmountOfSubstanceConcentration type Concentration = AmountOfSubstanceConcentration type DLuminance = Dim Neg2 Zero Zero Zero Zero Zero Pos1 type Luminance = Quantity DLuminance square :: Num a => Unit DLength a -> Unit DArea a cubic :: Num a => Unit DLength a -> Unit DVolume a type DPlaneAngle = DOne type PlaneAngle = Dimensionless type DSolidAngle = DOne type SolidAngle = Dimensionless type DFrequency = Dim Zero Zero Neg1 Zero Zero Zero Zero type Frequency = Quantity DFrequency type DForce = Dim Pos1 Pos1 Neg2 Zero Zero Zero Zero type Force = Quantity DForce type DPressure = Dim Neg1 Pos1 Neg2 Zero Zero Zero Zero type DStress = DPressure type Pressure = Quantity DPressure type Stress = Quantity DStress type DEnergy = Dim Pos2 Pos1 Neg2 Zero Zero Zero Zero type DWork = DEnergy type DQuantityOfHeat = DEnergy type Energy = Quantity DEnergy type Work = Quantity DWork type QuantityOfHeat = Quantity DQuantityOfHeat type DPower = Dim Pos2 Pos1 Neg3 Zero Zero Zero Zero type DRadiantFlux = DPower type Power = Quantity DPower type RadiantFlux = Quantity DRadiantFlux type DElectricCharge = Dim Zero Zero Pos1 Pos1 Zero Zero Zero type DQuantityOfElectricity = DElectricCharge type ElectricCharge = Quantity DElectricCharge type QuantityOfElectricity = Quantity DQuantityOfElectricity type DElectricPotential = Dim Pos2 Pos1 Neg3 Neg1 Zero Zero Zero type DPotentialDifference = DElectricPotential type DElectromotiveForce = DElectricPotential type ElectricPotential = Quantity DElectricPotential type PotentialDifference = Quantity DPotentialDifference type ElectromotiveForce = Quantity DElectromotiveForce type DCapacitance = Dim Neg2 Neg1 Pos4 Pos2 Zero Zero Zero type Capacitance = Quantity DCapacitance type DElectricResistance = Dim Pos2 Pos1 Neg3 Neg2 Zero Zero Zero type ElectricResistance = Quantity DElectricResistance type DElectricConductance = Dim Neg2 Neg1 Pos3 Pos2 Zero Zero Zero type ElectricConductance = Quantity DElectricConductance type DMagneticFlux = Dim Pos2 Pos1 Neg2 Neg1 Zero Zero Zero type MagneticFlux = Quantity DMagneticFlux type DMagneticFluxDensity = Dim Zero Pos1 Neg2 Neg1 Zero Zero Zero type MagneticFluxDensity = Quantity DMagneticFluxDensity type DInductance = Dim Pos2 Pos1 Neg2 Neg2 Zero Zero Zero type Inductance = Quantity DInductance type DLuminousFlux = DLuminousIntensity type LuminousFlux = Quantity DLuminousFlux type DIlluminance = Dim Neg2 Zero Zero Zero Zero Zero Pos1 type Illuminance = Quantity DIlluminance type DCelsiusTemperature = DThermodynamicTemperature type CelsiusTemperature = Quantity DCelsiusTemperature type DActivity = DFrequency type Activity = Quantity DActivity type DAbsorbedDose = Dim Pos2 Zero Neg2 Zero Zero Zero Zero type DSpecificEnergy = DAbsorbedDose type DKerma = DAbsorbedDose type AbsorbedDose = Quantity DAbsorbedDose type SpecificEnergy = Quantity DSpecificEnergy type Kerma = Quantity DKerma type DDoseEquivalent = DAbsorbedDose type DAmbientDoseEquivalent = DDoseEquivalent type DDirectionalDoseEquivalent = DDoseEquivalent type DPersonalDoseEquivalent = DDoseEquivalent type DEquivalentDose = DDoseEquivalent type DoseEquivalent = Quantity DDoseEquivalent type AmbientDoseEquivalent = DoseEquivalent type DirectionalDoseEquivalent = DoseEquivalent type PersonalDoseEquivalent = DoseEquivalent type EquivalentDose = DoseEquivalent type DAngularVelocity = DFrequency type AngularVelocity = Quantity DAngularVelocity type DAngularAcceleration = Dim Zero Zero Neg2 Zero Zero Zero Zero type AngularAcceleration = Quantity DAngularAcceleration type DDynamicViscosity = Dim Neg1 Pos1 Neg1 Zero Zero Zero Zero type DynamicViscosity = Quantity DDynamicViscosity type DMomentOfForce = DEnergy type MomentOfForce = Quantity DMomentOfForce type DSurfaceTension = Dim Zero Pos1 Neg2 Zero Zero Zero Zero type SurfaceTension = Quantity DSurfaceTension type DHeatFluxDensity = Dim Zero Pos1 Neg3 Zero Zero Zero Zero type DIrradiance = DHeatFluxDensity type HeatFluxDensity = Quantity DHeatFluxDensity type Irradiance = Quantity DIrradiance type DRadiantIntensity = DPower type RadiantIntensity = Quantity DRadiantIntensity type DRadiance = DIrradiance type Radiance = Quantity DRadiance type DHeatCapacity = Dim Pos2 Pos1 Neg2 Zero Neg1 Zero Zero type DEntropy = DHeatCapacity type HeatCapacity = Quantity DHeatCapacity type Entropy = Quantity DEntropy type DSpecificHeatCapacity = Dim Pos2 Zero Neg2 Zero Neg1 Zero Zero type DSpecificEntropy = DSpecificHeatCapacity type SpecificHeatCapacity = Quantity DSpecificHeatCapacity type SpecificEntropy = Quantity DSpecificEntropy type DThermalConductivity = Dim Pos1 Pos1 Neg3 Zero Neg1 Zero Zero type ThermalConductivity = Quantity DThermalConductivity type DEnergyDensity = DPressure type EnergyDensity = Quantity DEnergyDensity type DElectricFieldStrength = Dim Pos1 Pos1 Neg3 Neg1 Zero Zero Zero type ElectricFieldStrength = Quantity DElectricFieldStrength type DElectricChargeDensity = Dim Neg3 Zero Pos1 Pos1 Zero Zero Zero type ElectricChargeDensity = Quantity DElectricChargeDensity type DElectricFluxDensity = Dim Neg2 Zero Pos1 Pos1 Zero Zero Zero type ElectricFluxDensity = Quantity DElectricFluxDensity type DPermittivity = Dim Neg3 Neg1 Pos4 Pos2 Zero Zero Zero type Permittivity = Quantity DPermittivity type DPermeability = Dim Pos1 Pos1 Neg2 Neg2 Zero Zero Zero type Permeability = Quantity DPermeability type DMolarEnergy = Dim Pos2 Pos1 Neg2 Zero Zero Neg1 Zero type MolarEnergy = Quantity DMolarEnergy type DMolarEntropy = Dim Pos2 Pos1 Neg2 Zero Neg1 Neg1 Zero type DMolarHeatCapacity = DMolarEntropy type MolarEntropy = Quantity DMolarEntropy type MolarHeatCapacity = Quantity DMolarHeatCapacity type DExposure = Dim Zero Neg1 Pos1 Pos1 Zero Zero Zero type Exposure = Quantity DExposure type DAbsorbedDoseRate = Dim Pos2 Zero Neg3 Zero Zero Zero Zero type AbsorbedDoseRate = Quantity DAbsorbedDoseRate type DImpulse = Dim Pos1 Pos1 Neg1 Zero Zero Zero Zero type Impulse = Quantity DImpulse type DMassFlow = Dim Zero Pos1 Neg1 Zero Zero Zero Zero type MassFlow = Quantity DMassFlow type DGravitationalParameter = Dim Pos3 Zero Neg2 Zero Zero Zero Zero type GravitationalParameter = Quantity DGravitationalParameter type DKinematicViscosity = Dim Pos2 Zero Neg1 Zero Zero Zero Zero type KinematicViscosity = Quantity DKinematicViscosity type Angle = PlaneAngle type Thrust = Force type EnergyPerUnitMass = SpecificEnergy -- | Please refer to the literate Haskell code for documentation of both -- API and implementation. module Numeric.Units.Dimensional.TF.SIUnits deka :: Num a => Unit d a -> Unit d a yotta :: Num a => Unit d a -> Unit d a zetta :: Num a => Unit d a -> Unit d a exa :: Num a => Unit d a -> Unit d a peta :: Num a => Unit d a -> Unit d a tera :: Num a => Unit d a -> Unit d a giga :: Num a => Unit d a -> Unit d a mega :: Num a => Unit d a -> Unit d a kilo :: Num a => Unit d a -> Unit d a hecto :: Num a => Unit d a -> Unit d a deca :: Num a => Unit d a -> Unit d a deci :: Fractional a => Unit d a -> Unit d a yocto :: Fractional a => Unit d a -> Unit d a zepto :: Fractional a => Unit d a -> Unit d a atto :: Fractional a => Unit d a -> Unit d a femto :: Fractional a => Unit d a -> Unit d a pico :: Fractional a => Unit d a -> Unit d a nano :: Fractional a => Unit d a -> Unit d a micro :: Fractional a => Unit d a -> Unit d a milli :: Fractional a => Unit d a -> Unit d a centi :: Fractional a => Unit d a -> Unit d a metre :: Num a => Unit DLength a meter :: Num a => Unit DLength a gram :: Fractional a => Unit DMass a second :: Num a => Unit DTime a ampere :: Num a => Unit DElectricCurrent a kelvin :: Num a => Unit DThermodynamicTemperature a mole :: Num a => Unit DAmountOfSubstance a candela :: Num a => Unit DLuminousIntensity a fromDiffTime :: Fractional a => DiffTime -> Time a toDiffTime :: (Real a, Fractional a) => Time a -> DiffTime radian :: Fractional a => Unit DPlaneAngle a steradian :: Fractional a => Unit DSolidAngle a hertz :: Fractional a => Unit DFrequency a newton :: Fractional a => Unit DForce a pascal :: Fractional a => Unit DPressure a joule :: Fractional a => Unit DEnergy a watt :: Fractional a => Unit DPower a coulomb :: Fractional a => Unit DElectricCharge a volt :: Fractional a => Unit DElectricPotential a farad :: Fractional a => Unit DCapacitance a ohm :: Fractional a => Unit DElectricResistance a siemens :: Fractional a => Unit DElectricConductance a weber :: Fractional a => Unit DMagneticFlux a tesla :: Fractional a => Unit DMagneticFluxDensity a henry :: Fractional a => Unit DInductance a lumen :: Fractional a => Unit DLuminousFlux a lux :: Fractional a => Unit DIlluminance a degreeCelsius :: Num a => Unit DCelsiusTemperature a fromDegreeCelsiusAbsolute :: Fractional a => a -> ThermodynamicTemperature a toDegreeCelsiusAbsolute :: Fractional a => ThermodynamicTemperature a -> a becquerel :: Fractional a => Unit DActivity a gray :: Fractional a => Unit DAbsorbedDose a sievert :: Fractional a => Unit DDoseEquivalent a minute :: Num a => Unit DTime a day :: Num a => Unit DTime a hour :: Num a => Unit DTime a degree :: Floating a => Unit DPlaneAngle a arcsecond :: Floating a => Unit DPlaneAngle a arcminute :: Floating a => Unit DPlaneAngle a degreeOfArc :: Floating a => Unit DPlaneAngle a secondOfArc :: Floating a => Unit DPlaneAngle a minuteOfArc :: Floating a => Unit DPlaneAngle a litre :: Fractional a => Unit DVolume a liter :: Fractional a => Unit DVolume a tonne :: Fractional a => Unit DMass a metricTon :: Fractional a => Unit DMass a module Numeric.Units.Dimensional.TF.Prelude -- | Please refer to the literate Haskell code for documentation of both -- API and implementation. module Numeric.Units.Dimensional.TF.NonSI electronVolt :: Fractional a => Unit DEnergy a unifiedAtomicMassUnit :: Fractional a => Unit DMass a gee :: Fractional a => Unit DAcceleration a inch :: Fractional a => Unit DLength a foot :: Fractional a => Unit DLength a poundMass :: Fractional a => Unit DMass a ounce :: Fractional a => Unit DMass a poundForce :: Fractional a => Unit DForce a psi :: Fractional a => Unit DPressure a yard :: Fractional a => Unit DLength a nauticalMile :: Fractional a => Unit DLength a mile :: Fractional a => Unit DLength a revolution :: Floating a => Unit DOne a solid :: Floating a => Unit DOne a teaspoon :: Fractional a => Unit DVolume a year :: Num a => Unit DTime a century :: Num a => Unit DTime a bar :: Fractional a => Unit DPressure a atmosphere :: Fractional a => Unit DPressure a technicalAtmosphere :: Fractional a => Unit DPressure a mmHg :: Fractional a => Unit DPressure a torr :: Fractional a => Unit DPressure a rad :: Fractional a => Unit DAbsorbedDose a stokes :: Fractional a => Unit DKinematicViscosity a