
13 Aug
2015
13 Aug
'15
2:29 a.m.
CmpSymbol might work for you. Note that it works only on Symbols (type-level strings) and not arbitrary types. I didn't like it because I wanted it to be possible to leverage Haskell's module system to allow distinct units but with the same name, declared in different modules. (For example, "pound" can refer to a plethora of different units.) This requirement may have been a step too far, and I'd be curious to see how much the system could be simplified without it.
I'm currently trying to achieve this by combining Symbols with Typeable and TemplateHaskell. Should be possible. Silvio