Patrick Browne schrieb:
> Below is some code that is produces information about the *types* used
> for measuring (e.g. metres).  The following evaluation returns 1.00
> which the convert factor for metres.
> 
> convertFactorToBaseUnit (unit (LengthInMetres  7))
> .
> The next evaluation returns the type, Metre, of data being measured
> unit (LengthInMetres  7)

Is there a reason why you use an individual type for every unit?
The existing implementations of typed physical units only encode the
physical dimension in types and leave the unit factors to the value
level. I found this to be the most natural way.

http://www.haskell.org/haskellwiki/Physical_units


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to