Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to define derived units from other derived units #5

Open
expipiplus1 opened this issue Sep 25, 2015 · 1 comment
Open

Unable to define derived units from other derived units #5

expipiplus1 opened this issue Sep 25, 2015 · 1 comment

Comments

@expipiplus1
Copy link
Contributor

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"’
@adamgundry
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants