[Haskell-cafe] Unique Ordered Types

Silvio Frischknecht silvio.frischi at gmail.com
Thu Aug 13 02:29:32 UTC 2015


> 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


More information about the Haskell-Cafe mailing list