Kevin GLYNN <[EMAIL PROTECTED]> writes:
> I realise that some time ago one of the ghc lists said that 'anyone who
> compiles a happy output file with optimisation flags set has cold
> semolina for brains' (or words to that effect).
I believe it was porridge - we're in Scotland here :-)
> However, if I compile
> the hs file produced from the following happy file with a -O flag ghc
> will bust whatever heap size I give it, works OK without the
> optimisation flag.
This is most likely due to the strictness analyser or the update
analyser being confused by the recursive HappyState type in the
generated grammar. It's a known bug in both of these abstract
interpreters.
There simply isn't any useful optimisation to do in Happy grammar
files, which is why we recommend not using -O (and because it tickles
these bugs of course...).
Cheers,
Simon
--
Simon Marlow [EMAIL PROTECTED]
University of Glasgow http://www.dcs.gla.ac.uk/~simonm/
finger for PGP public key