-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A numeric type for managing and automating engineering units. -- -- A numeric type for managing and automating engineering units. @package engineering-units @version 0.0.2 -- | A numeric type to manage engineering units. -- -- Provides automatic unit conversion: -- --
-- > print $ value (1 * h + 1 * min') s -- Time in seconds of 1 hour + 1 minute. -- 3660.0 ---- -- Automatic unit reduction: -- --
-- > print $ value (20 * gpm * 10 * min') gal -- Note the minutes cancel each other out. -- 200.0 ---- -- And consistency checking: -- --
-- > print $ value (22 * mph + 3 gal) mph -- Note that speed (m/s) is inconsistent with volume (m^3). -- *** Exception: Incompatible units: [M]/[S] /= [M,M,M]/[] ---- -- And defining new units is easy: -- --
-- -- | Millimeters, a measure of distance, is 1/1000 of a meter. -- mm :: Value -- mm = 0.001 * m ---- --
-- -- | Joules, a measure of energy, is one newton meter. -- j :: Value -- j = n * m --module Data.EngineeringUnits -- | A value is a number and its associated units. data Value -- | Extract a value in the given units. -- --
-- value val units -- value (2.54 * cm) in' --value :: Value -> Value -> Double -- | Meters. m :: Value -- | Centimeters. cm :: Value -- | Millimeters. mm :: Value -- | Kilometers. km :: Value -- | Inches. in' :: Value -- | Feet. ft :: Value -- | Miles. mi :: Value -- | Centimeters ^ 2. cm2 :: Value -- | Inches ^ 2. in2 :: Value -- | Centimeters ^ 3. cm3 :: Value -- | Milliliters. ml :: Value -- | Liters. l :: Value -- | Inches ^ 3. in3 :: Value -- | Gallons. gal :: Value -- | Kilograms. kg :: Value -- | Grams. g :: Value -- | Milligrams. mg :: Value -- | Newtons. n :: Value -- | Pounds. lbs :: Value -- | Revolutions. rev :: Value -- | Miles per hour. mph :: Value -- | Kilometers per hour. kph :: Value -- | Revolutions per minute. rpm :: Value -- | Seconds. s :: Value -- | Nanoseconds. ns :: Value -- | Microseconds. us :: Value -- | Milliseconds. ms :: Value -- | Minutes. min' :: Value -- | Hours. h :: Value -- | Joules. j :: Value -- | BTUs. btu :: Value -- | Horsepower. hp :: Value -- | Watts. w :: Value -- | Kilowatts. kw :: Value -- | Pounds per inch ^ 2. psi :: Value -- | Bar. bar :: Value -- | Gallons per minute. gpm :: Value -- | Liters per minute. lpm :: Value -- | Seconds ^ 2. s2 :: Value -- | Radians per revolution: 2 * pi / rev radsPerRev :: Value instance GHC.Classes.Ord Data.EngineeringUnits.Value instance GHC.Classes.Eq Data.EngineeringUnits.Value instance GHC.Show.Show Data.EngineeringUnits.Value instance GHC.Show.Show Data.EngineeringUnits.Unit instance GHC.Classes.Ord Data.EngineeringUnits.Unit instance GHC.Classes.Eq Data.EngineeringUnits.Unit instance GHC.Num.Num Data.EngineeringUnits.Value instance GHC.Real.Fractional Data.EngineeringUnits.Value instance GHC.Float.Floating Data.EngineeringUnits.Value