Commits

Thijs Alkemade  committed c9619f0

Added pounds and flozs, fixed miles.

  • Participants
  • Parent commits af2dc42

Comments (0)

Files changed (1)

File src/UnitTyped/SI/Derived.hs

 type Miles = (Fractional f) => Value f LengthUnit Mile
 
 instance Convertable LengthUnit Mile where
-	factor _ = 1609
+	factor _ = 1609.344
 	showunit _ _ = "mile"
 --
 
 	factor _ = 0.00454609
 	showunit _ _ = "gallon"
 
+data FluidOunce
+
+instance Convertable VolumeUnit FluidOunce where
+	factor _ = 0.0000284130625
+	showunit _ _ = "fl oz"
+
 ----
 -- Time
 ----
 -- Mass
 ----
 
-type Kilograms = (Fractional f) => Value f MassUnit (Kilo Gram)
-
 data PlanckMass
 type PlanckMasses = (Fractional f) => Value f MassUnit PlanckMass
 
 	factor _ = 2.176513e-8
 	showunit _ _ = "m_P"
 
+data Pound
+
+instance Convertable MassUnit Pound where
+	factor _ = 0.45359237
+	showunit _ _ = "lb"
+
 ----
 -- Misc
 ----
 gallon :: (Fractional f) => Value f VolumeUnit Gallon
 gallon = one
 
+fluid_ounce :: (Fractional f) => Value f VolumeUnit FluidOunce
+fluid_ounce = one
+
 --
 
 minute :: (Fractional f) => Value f TimeUnit Minute
 
 --
 
-kilogram :: (Fractional f) => Value f MassUnit (Kilo Gram)
-kilogram = one
-
 m_P :: (Fractional f) => Value f MassUnit PlanckMass
 m_P = one
 
+pound :: (Fractional f) => Value f MassUnit Pound
+pound = one
+
 --
 
 newton :: (Fractional f) => Value f Force Newton