
14 Jun
2005
14 Jun
'05
4:15 a.m.
For extra fun, notice that you can make declarations like: data (Unit u) => Kilo u = Kilo u instance (Unit u) => Unit (Kilo u) where shortName (Kilo u) = "k" ++ shortName u which behaves in ghci like: *Main> UnitValue (Kilo Meter) 30 30km - Cale