[Thanks for steering me to hugs-bugs.  Where can I find out about
haskell-cafe?]

On Sun, 24 Sep 2000, Mark P Jones wrote:

> [Let's take any further correspondence on this over into Hugs-bugs,
> or at least into haskell-cafe ... thanks!]
> 
> | When I try to load the parser generated by Happy for a modest-sized
> | language into Hugs I get:
> | 
> | Too many variables (16000) in type checker
> | 
> | I'm running Hugs 98 on a Power Macintosh.  I increased the constraint
> | cutoff limit to no avail (which didn't surprise me).
> 
> Right, the constraint cutoff limit isn't a factor here.
> 
> | I am unable to increase the heap size (much) above its
> | default 250000 cells.  It sounds from the error message,
> | though, that 16000 is simply a limit set in the
> | Hugs interpreter.
> 
> No, it's not an intrinsic limit in Hugs.  The message appears
> when a call to malloc (i.e., the memory allocation function
> provided by the underlying C implementation) fails.
> 
> Perhaps there is a limit in the Mac version of Hugs on the
> amount of memory that can be allocated to a program?  Perhaps
> the folks that have worked on Mac Hugs can answer this.  Or
> perhaps there is a way for you to change memory limits for
> Hugs within the MacOS.

Yes, I increased the memory allocated to Hugs and the problem went away.
Thanks!

> | Any ideas on how to make this combination of Happy-generated
> | parser and Hugs work together?
> 
> Parser generators are good tools for stressing an implementation;
> they tend to generate code that no human would ever write, often
> with huge groups of mutually recursive functions.  In these days
> of multimegabyte machines, the kind of problem you describe doesn't
> happen too often any more.  But even on bigger machines, you'll
> often see a noticeable pause when Hugs loads the source for a
> generated parser.

And also lexer generators, apparently.  After extending my lexer modestly
(I think), I now get:

INTERNAL ERROR: Application parameter stack overflow

from Hugs when trying to run Alex to generate a lexer.  I haven't been
able to find any mention of internal errors in all the Hugs documentation
I've seen.  Any ideas?

> 
> All the best,
> Mark

Thanks again.  By the way, I'm new to Hugs but finding it a very pleasant
development environment on the whole.

Dean


Reply via email to