monomorphism/hugs98/ghc-5.02.3

Alastair Reid reid@cs.utah.edu
31 May 2002 17:38:11 +0100


> 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