I accidentally the Prelude

2010-03-01 Thread Josef Svenningsson
Hi, It seems I've been able to mess up my ghc installation pretty badly. Here is what happens if I just try to invoke ghci from the prompt: $ ghci GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ...

Re: I accidentally the Prelude

2010-03-01 Thread Tom Tobin
On Mon, Mar 1, 2010 at 11:43 AM, Josef Svenningsson wrote: > What I really would like to know is if there is a simple way to fix > this without completely reinstalling ghc with all the libraries I have > installed. Has anyone else experienced anything similar? Here's what I'd do, with the caveat

Re: I accidentally the Prelude

2010-03-01 Thread Jeremy Shaw
is there, by chance, a file named Prelude.hs in the working directory? (the directory you are in when you type ghci?) - jeremy On Mon, Mar 1, 2010 at 11:43 AM, Josef Svenningsson < josef.svennings...@gmail.com> wrote: > Hi, > > It seems I've been able to mess up my ghc installation pretty badly.

Re: I accidentally the Prelude

2010-03-02 Thread Josef Svenningsson
On Mon, Mar 1, 2010 at 11:54 PM, Jeremy Shaw wrote: > is there, by chance, a file named Prelude.hs in the working directory? (the > directory you are in when you type ghci?) > - jeremy > Ah. Thanks! That was indeed the problem. Though I think ghci:s response could be a little bit more transparent

Re: I accidentally the Prelude

2010-03-02 Thread Simon Marlow
On 02/03/2010 08:59, Josef Svenningsson wrote: On Mon, Mar 1, 2010 at 11:54 PM, Jeremy Shaw wrote: is there, by chance, a file named Prelude.hs in the working directory? (the directory you are in when you type ghci?) - jeremy Ah. Thanks! That was indeed the problem. Though I think ghci:s res

Re: I accidentally the Prelude

2010-03-02 Thread Josef Svenningsson
On Tue, Mar 2, 2010 at 12:21 PM, Simon Marlow wrote: > On 02/03/2010 08:59, Josef Svenningsson wrote: >> >> On Mon, Mar 1, 2010 at 11:54 PM, Jeremy Shaw  wrote: >>> >>> is there, by chance, a file named Prelude.hs in the working directory? >>> (the >>> directory you are in when you type ghci?) >>>

Re: I accidentally the Prelude

2010-03-02 Thread Jeremy Shaw
I would still vote for that error in the 'worst ghc error message contest'. I got it just last night with 6.13 when I tried to run the Setup.hs function in base: ~/n-heptane/projects/haskell/darcs/base-3.0.3.2 $ rm Setup.o Setup.hi ~/n-heptane/projects/haskell/darcs/base-3.0.3.2 $ ghc --make -O2 S

Re: I accidentally the Prelude

2010-03-02 Thread Simon Marlow
On 02/03/2010 15:46, Jeremy Shaw wrote: I would still vote for that error in the 'worst ghc error message contest'. I got it just last night with 6.13 when I tried to run the Setup.hs function in base: ~/n-heptane/projects/haskell/darcs/base-3.0.3.2 $ rm Setup.o Setup.hi ~/n-heptane/projects/has

Re: I accidentally the Prelude

2010-03-02 Thread Yitzchak Gale
Jeremy Shaw wrote: >> I would still vote for that error in the 'worst ghc error message >> contest'... Simon Marlow wrote: > Oh, the problem here is that... when we got around > to trying to import it we found that it was not "loaded". > Perhaps the implicit import of Prelude should be... > What y

Re: I accidentally the Prelude

2010-03-03 Thread Simon Marlow
On 02/03/2010 17:45, Yitzchak Gale wrote: Jeremy Shaw wrote: I would still vote for that error in the 'worst ghc error message contest'... Simon Marlow wrote: Oh, the problem here is that... when we got around to trying to import it we found that it was not "loaded". Perhaps the implicit impo

Re: I accidentally the Prelude

2010-03-03 Thread Yitzchak Gale
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 m

Re: I accidentally the Prelude

2010-03-03 Thread Simon Marlow
On 03/03/2010 12:37, Yitzchak Gale wrote: 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

Re: I accidentally the Prelude

2010-03-03 Thread Yitzchak Gale
I wrote: >> I was suggesting that whenever the Prelude fails to load, >> the error message should contain that hint. > hmm, I'll think about that. Is it not enough to see a compilation error > pointing to the file Prelude.hs? Seems obvious in the context of this thread. But not being in the middl