
22 Dec
2010
22 Dec
'10
5:45 p.m.
On Tue, Dec 14, 2010 at 10:31 AM, Pierre-Etienne Meunier
Is there something like an identity type, transparent to the type-checker, in haskell ? For instance, I'm defining an interval arithmetic, with polynomials, matrices, and all that... defined with intervals. The types are :
No, such a thing doesn't exist. In fact, it would make the type system undecidable if it did exist. I only know this because a long while ago I really wanted such a thing to exist then tried to work out the consequences and realized it would break the type system. I have found liberal use of 'newtype-deriving' has mitigated my need for it in the specific cases I was interested in. John