monomorphism/hugs98/ghc-5.02.3

Sigbjorn Finne sof@galois.com
Fri, 31 May 2002 10:50:56 -0700


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" <reid@cs.utah.edu>
To: "Matt Fairtlough" <m.fairtlough@dcs.shef.ac.uk>
Cc: <sqrtofone@yahoo.com>; <glasgow-haskell-users@haskell.org>
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
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users