On Tue, Dec 14, 2010 at 10:31 AM, Pierre-Etienne Meunier
<[email protected]> wrote:
> 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

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to