This is actually no longer an issue, as H98's behaviour
for derived Show and Read instances have changed
recently.

When Simon next has the time (and inclination) to put out
a Report revision, text describing the change will be
included. In the meantime, have a look at 
static.c:mkReadInfix() and static.c:showsPrecRhs() in
the current Hugs98 sources for details of the tweaks made.

--sigbjorn

----- Original Message ----- 
From: "Alastair Reid" <[EMAIL PROTECTED]>
To: "Matt Fairtlough" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, May 31, 2002 09:38
Subject: Re: monomorphism/hugs98/ghc-5.02.3


> 
> > It encourages me to submit my next problem: stack overflow with
> > simple Show instances...more later
> 
> Let me guess that this involves a data declaration of the form:
> 
>   data Foo = ... | Foo <op> ... | ...
> 
> That is an infix data constructor whose first argument is a recursive 
> reference to the datatype.
> 
> This will throw the parser into an infinite loop - the usual problem
> of recursive descent parsers and left recursive grammars.
> 
> (If anyone is keeping a list of things to fix in Haskell 2, this
> should be on the list.  Seems that this oversight is almost as
> embarrassing as Bell Labs (home of Aho, Sethi and Ullmann) designing a
> language (C) which is not context free (because of the typedef
> problem).)
> 
> --
> Alastair Reid
> _______________________________________________
> Glasgow-haskell-users mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to