I accidentally the Prelude

Yitzchak Gale gale at sefer.org
Wed Mar 3 07:37:03 EST 2010

Jeremy Shaw wrote:
>>> I would still vote for that error in the 'worst ghc error message
>>> contest'...

I wrote:
>> Can't we add something like "(Is there more than one
>> Prelude in your path?)" to the message for Prelude?

Simon Marlow wrote:
> So I could add a warning ("Warning: this Prelude module is shadowing the
> real Prelude", or something), but then we'd need a new flag to turn off the
> warning if shadowing the Prelude is what you're really trying to do, and
> that sounds like an awful lot of bother to fix a very rare corner case.  Or
> can anyone think of a better way to handle this?

I was suggesting that whenever the Prelude fails to load,
the error message should contain that hint.

We'd also like to help rescue people who get weird behavior
when, unbeknownst to them, the wrong Prelude loads
successfully. But I understand your point that this second case
is trickier and may not be worth the effort.


More information about the Glasgow-haskell-users mailing list