[Haskell-cafe] Ordering TypeRep from Data.Typeable.

Serguey Zefirov sergueyz at gmail.com
Thu Aug 26 13:42:58 EDT 2010


I think, that TypeRep type from Data.Typeable needs Ord class instance.

It is unnecessary, but is handy when needed.

My use case follows.

I try to create graph whose node and arc labels are differently typed.
So I can add Int node, Float node and link them by Conversion arc.

Right now I am quite good with GADTs that hide values of different types.

But when I thinking about querying that structure, I start to want
ordered TypeRep. I then can collect different arcs and nodes into
different sets and speed up query processing dramatically.


More information about the Haskell-Cafe mailing list