-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add parsing functionality (possible in a new package) #230
Comments
Could you show me an example of what you have in mind as API/usage? Maybe take a look At @dmcclean’s @dmcclean maybe you can comment? |
Thanks for linking previous work. Ideally, the parsing interface would be more type-safe than parseQuantity :: Text -> Either Error (Quantity d a) where the user must specify what dimension I haven't thought how that would work in practice though |
Related issue: #8 |
It seems it could make sense to parse to a Convoluted (and untested) use case for DynQuantity parsing:
This allows the inputs to be a force and a velocity, or a torque and an angular velocity, or a current and a voltage. Note: I took the liberty to disregard that Anyway, I don't feel very strongly about this. Maybe the first step is to determine your level of ambition… as indicated in #8 parsing units can get hairy. I can also see how it could be nice to have a parse/read capability with lighter dependencies than |
One source of problems when dealing with units at the boundary between the user and a program, or between programs. However, there is currently no way to parse
Quantity
andUnit
from unstructured text.@bjornbm Would you be OK if this repository contained two packages,
dimensional
and possiblydimensional-parsing
?The text was updated successfully, but these errors were encountered: