Open dmcclean opened 5 years ago
I don't have any objections or strong feelings about the direction to take. Reusing what we have without introducing new types might be more economical in terms of exposed API?
I don't see a problem with a single collection for SIUnits
as it is well . NonSI
on the other hand is quite open-ended so I'm not so sure what is the right approach… maybe a single collection as well until a concrete need arises for groups?
You have the use case clearer in your mind so feel free to draft a design you think would work for you. As I said I have no objections. Perhaps these monomorphic collections could be provided by other modules instead of adding to the existing ones, something like Numeric.Units.Dimensional.SIUnits.{Monomorphic,Dynamic}
instead of Numeric.Units.Dimensional.SIUnits
?
OK, I have a draft on this that I will submit soon.
I would like the
Numeric.Units.Dimensional.SIUnits
andNumeric.Units.Dimensional.NonSI
modules to provide monomorphic collections of all unit definitions published therein, for use by downstream packages that perform unit parsing.Perhaps this is best done through a simple
[AnyUnit]
, or perhaps theNumeric.Units.Dimensional.Dynamic
module should export some sort ofUnitSet
that enforces uniqueness of names by some strategy, I'm not sure?Also unsure whether publishing a single monolithic collection per module is the best approach or whether a further attempt should be made to curate them into smaller groups.