A Little Learning is a Dangerous Thing !
Antony Courtney
antony@apocalypse.org
Mon, 14 May 2001 09:29:21 -0400
Hi Iain,
Iain McNaughton wrote:
>
> Well, I thought to myself ( fool that I evidently was ! ) that there
> must be a parameter somewhere in Hugs that I can set to increase the
> program storage space, so I set out to find it. Unfortunately, having
> tweaked a couple of numbers ( heap size was one, I think, and the other
> was something similar-looking ), and restarted Hugs, I now have the
> following error as I start WinHugs: "Cannot allocate heap storage".
> Immediately after this error message within the WinHugs interface, a
> pop-up box appears, containing the message: "Fatal Error: unable to load
> prelude". At that point, WinHugs disappears.
>
> I've tried uninstalling Hugs, and completely re-installing it, but that
> doesn't appear to do any good. So, I've clearly f*cked up somewhere, but
> I'm not sure where. Any comments or advice would be greatly appreciated.
Actually, I think you have stepped on a known design problem concerning how hugs
stores its state to the registry under Windows. Unfortunately, every time you
do a ":set" in hugs, the changes you make to the options settings are stored in
the registry. This is great if you set the right option in exactly the right
way, but is brutally unforgiving of mistakes (as you have discovered).
Your best bet (be VERY careful doing this) is to run "regedit" (by selecting
"Run..." from the Windows "Start" menu and typing "regedit"), and navigate to
the key:
"HKEY_CURRENT_USER\Software\Haskell\Hugs"
select the subkey folder for your hugs version (i.e. "February 2000").
The "Options" key contains the options settings you entered. You can try and
edit this by hand to get rid of the options settings that accidentally caused
your problem.
I *think* you can also just delete this key altogether and hugs will revert to
its default configuration.
All of this is done at your own risk.
> I understand that this might not count as a bug in its own right, as the
> software is presumably behaving in a perfectly sensible way; rather, the
> bug is in me, the over-adventurous user. However, though I've read all
> the documentation, I'm stuck, and would appreciate any help or
> assistance you can give me. If you want to flame me for gross stupidity,
> that would be fine, too !
Whether this is a bug or a "design flaw" is a matter of opinion.
But hopefully we all agree that an "adventurous user" should not be punished
with an unusable hugs installation for all time!
We are working on improving this situation.
Good luck,
-antony
--
Antony Courtney
Grad. Student, Dept. of Computer Science, Yale University
antony@apocalypse.org http://www.apocalypse.org/pub/u/antony