|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
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
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
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.
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
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,
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.
On Thu, 16 Mar 2000, Chris Okasaki wrote:
newtype Foo = F Foo
Interesting loop hole you found there! Semantically it should be pretty
clear what this type means, just as the corresponding meaning on the
value level:
bottom = bottom
Foo is simply Void! (formal def. later)
Void has been in
On Thu, 16 Mar 2000, Chris Okasaki wrote:
newtype Foo = F Foo
Interesting loop hole you found there! Semantically it should be pretty
clear what this type means, just as the corresponding meaning on the
value level:
bottom = bottom
Foo is simply Void! (formal def. later)
Void has been in