[Haskell-cafe] Unique Ordered Types
silvio.frischi at gmail.com
Wed Aug 12 21:20:31 UTC 2015
Hi I'm experimenting with a unit system in haskell where users can add
"base units". I want to reduce units after multiplication and bring it
into a canonical form. The problem is what kind of types can the units have.
Problem: They can't be ordered so UnitA * UnitB can be compared to UnitB
* UnitA, but I can't make a canonical form, which would make type
inference a lot better.
type UnitA = Zero
type UnitB = Suc Zero
Problem: Now they can be ordered. But users can create conflicting
More information about the Haskell-Cafe