uom-plugin
uom-plugin copied to clipboard
Unable to define derived units from other derived units
Trying to defined hours in terms of minutes which are defined in terms of seconds:
[u| m = 60 s
, h = 60 m |]
leads to the error:
Couldn't match type ‘"m"’ with ‘"s"’
In the instance declaration for
‘Data.UnitsOfMeasure.Convert.HasCanonicalBaseUnit "h"’
Thanks for reporting these! This can probably be made to work, either by being more liberal in when conversion ratios can be defined (#4), or by having the TH code expand definitions itself. The latter might actually be preferable so we can detect cycles rather than putting GHC into a loop.