1. Thijs Alkemade
  2. haskell-unittyped
  3. Issues
Issue #2 resolved

Behavior of SI prefixes on quantities

Takayuki Muranushi
created an issue

For example, astronomers use "solar mass" as both quantities and units. The problem is that, 3 mega solarMass is smaller than solarMass :

ghci> let solarMass = 1.99e30 kilo gram
ghci> solarMass 
1.99e30 kg
ghci> 3 mega solarMass 
3.0 Mkg
ghci> 

One possible policy is to regard that prefixes are only allowed before units and above code should be an error. However, it's more convenient if the above syntax is allowed, and 3 mega solarMass == 5.97e30 Mkg . (It's even better if 3 mega solarMass == 5.97e36 kg , but Mkg will be okay since we can still add Mkg with grams.)

Comments (1)

  1. Log in to comment