RE: The return of the Void [Was: newtypes]

2000-04-03 Thread Simon Peyton-Jones
|newtype Foo = F Foo | | What is interesting is that ghc loops when trying to compile this | definition! (Ghc folks, consider this a bug report, details below!) I do consider this a bug report, and I've fixed it. (The reason is that GHC was trying to find the *representation* type of a

RE: The return of the Void [Was: newtypes]

2000-03-19 Thread Mark P Jones
I'd like to respond to recent comments about `strange' newtype definitions. Definitions like newtype Void = Void Void or variants using mutual recursion are, in my opinion, entirely reasonable (even if they are perhaps almost as entirely useless in practice). I don't really think it has

Re: The return of the Void [Was: newtypes]

2000-03-18 Thread Fergus Henderson
On 17-Mar-2000, Malcolm Wallace [EMAIL PROTECTED] wrote: The Haskell report explicitly allows recursive newtype definitions. So why is it reasonable for a compiler to reject them? nhc98 rejects circular newtypes which are semantically bottom, like newtype Void = Void Void newtype

Re: The return of the Void [Was: newtypes]

2000-03-17 Thread Fergus Henderson
On 17-Mar-2000, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: newtype Void = Void Void deriving Show Hugs and hbc accept it without complaining. (I haven't got nhc installed.) nhc98 reports Error when renaming:: Newtype Main.B is circular.

Re: The return of the Void [Was: newtypes]

2000-03-17 Thread Malcolm Wallace
The Haskell report explicitly allows recursive newtype definitions. So why is it reasonable for a compiler to reject them? nhc98 rejects circular newtypes which are semantically bottom, like newtype Void = Void Void newtype A = A B newtype B = B A because it cannot find a

Re: The return of the Void [Was: newtypes]

2000-03-17 Thread Fergus Henderson
On 16-Mar-2000, Patrik Jansson [EMAIL PROTECTED] wrote: On Thu, 16 Mar 2000, Chris Okasaki wrote: newtype Foo = F Foo ... Hugs and hbc accept it without complaining. (I haven't got nhc installed.) What is interesting is that ghc loops when trying to compile this definition! (Ghc folks,

Re: The return of the Void [Was: newtypes]

2000-03-17 Thread malcolm
newtype Void = Void Void deriving Show Hugs and hbc accept it without complaining. (I haven't got nhc installed.) nhc98 reports Error when renaming:: Newtype Main.B is circular. Newtype Main.A is circular. Newtype Main.Void is circular.