[Haskell-cafe] Re: Type classes and type equality

oleg at pobox.com oleg at pobox.com
Mon Apr 16 22:33:41 EDT 2007

Neil Mitchell wrote:
> I'm looking for a type class which checks whether two types are the
> same or not.

This problem is more complex than appears. It has been solved,
however. IncoherentInstances are not required, as IncoherentInstances
are generally unsafe.

For the full discussion of various solutions, please see Section 9 and
Appendix D of the HList paper:

The HList code is available
It includes the examples from the paper.

More information about the Haskell-Cafe mailing list