logo       

Re: newtype and existentials: msg#00032

lang.haskell.glasgow.bugs

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise