[Haskell-beginners] Re: Weighted average

apfelmus apfelmus at quantentunnel.de
Tue Nov 4 10:42:05 EST 2008


Michael Snoyman wrote:
> 
> newtype MilesPerGallon = MilesPerGallon Double deriving Show
> newtype Gallon = Gallon Double deriving Show
> newtype Mile = Mile Double deriving Show
> 

You may want to have a look at Björn Buckwalter's  dimensional  library

  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/dimensional


Regards,
apfelmus



More information about the Beginners mailing list