goldfirere / units

The home of the units Haskell package
95 stars 19 forks source link

Export monomorphic combinators #13

Closed goldfirere closed 10 years ago

goldfirere commented 10 years ago

A few minutes ago, I wanted to know how many yards there are in a mile. So, I said this:

(1 % Mile) # Yard

In response, I got complaints about an ambiguous LCSU. That makes enough sense, but it sure is exasperating for a user just taking this for a quick spin.

I propose new operators %% and ## that are monomorphic in their LCSU (requiring a DefaultLCSU) to make the above easier. We would export these from Data.Metrology.Mono and could encourage first-time users to try the mono functions first.

See also issue goldfirere/units-defs#2, which discusses related changes to the structure of the SI modules to support monomorphic programming.

goldfirere commented 10 years ago

Opening a new ticket for Data.Metrology.Mono, #15.