maybe so.  GHC does indeed treat recursive newtypes specially.  But I don't 
like that; it's a wart in the intermediate language.  But it's a wart I'd like 
to shrink, not grow.

S

| -----Original Message-----
| From: Ralf Hinze [mailto:[EMAIL PROTECTED]
| Sent: 18 November 2005 13:40
| To: Simon Peyton-Jones
| Cc: [email protected]
| Subject: Re: newtype and existentials
| 
| > yes.  a newtype declares a new type isomorphic to an existing type.
| >         newtype T = MkT S
| > declares T to be isomorphic to S.
| >
| > There is no existing Haskell type isomorphic to your Dynamic.
| 
| Following your reasoning, shouldn't GHC also reject
| 
| > newtype D = D (D -> D)
| 
| because there is no existing Haskell type isomorphic to D? And
| certainly, System F doesn't have recursive types either.
| 
| Cheers, Ralf
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to