goldfirere / units-defs

Public repo for the units-defs package of well-typed unit definitions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reorganize SI for experts and non-experts

goldfirere opened this issue · comments

A goal of mine in designing units is to allow both experts and non-experts to make good use of it. Here, "experts" are people who want several LCSUs and want to use polymorphism in all sorts of wonderful ways. "Non-experts" are people who are happy to stick to one system of units and want the thing just to type-check their physics homework.

So, I think we should have something like Data.Metrology.SI.Mono and Data.Metrology.SI.Poly, which export different capabilities. The Mono module will have instances for DefaultUnitOfDim, for example, to allow use with DefaultLCSU. The types exported from Mono would all use the DefaultLCSU and store numbers as Doubles, whereas the types exported from Poly would take these details as parameters.

Thoughts?