Re: I accidentally the Prelude
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. > 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 ... done. > Loading package base ... linking ... done. > : module `Prelude' is not loaded > $ > > I have no idea what I did to end up in this situation. What I've been > doing lately is reinstalling some packages. I also have another ghc > installed but it's at a completely different place in the file system. > The only thing I can think of is if cabal managed to somehow confuse > the two ghcs and wrote some data in the wrong place. > > 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? > > If this is a potential bug I'd be happy to provide any data that might > help track it down. > > Cheers, > > Josef > ___ > Glasgow-haskell-users mailing list > Glasgow-haskell-users@haskell.org > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: I accidentally the Prelude
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 that I'm still a Haskell novice: 1) Check your ~/.ghci file and make sure it's not doing anything strange. (You may not have one, which is fine.) 2) If rebuilding your cabal-installed libs and reinstalling cabal is fine, delete your ~/.ghc and ~/.cabal directories, make sure ghci works, and then re-install cabal and go from there. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
I accidentally the Prelude
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 ... done. Loading package base ... linking ... done. : module `Prelude' is not loaded $ I have no idea what I did to end up in this situation. What I've been doing lately is reinstalling some packages. I also have another ghc installed but it's at a completely different place in the file system. The only thing I can think of is if cabal managed to somehow confuse the two ghcs and wrote some data in the wrong place. 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? If this is a potential bug I'd be happy to provide any data that might help track it down. Cheers, Josef ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
C that setjmps -> haskell -> C that might longjmp
If I have the following call sequence C code -> Haskell code -> various C code bits where the various C code bits on the right might do a longjmp (their version of an exception) and jumping back to the C code on the left. Is it possible to have C code on the left then somehow tell GHC to cleanup the aborted Haskell code/resume executing it with an exception, or is the only option to setjmp wrap all the various C code bits on the right? Thanks! -Tyson signature.asc Description: This is a digitally signed message part. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Easily generating efficient instances for classes
> From: Christian H?ner zu Siederdissen > > Hi, > > I am thinking about how to easily generate instances for a class. Each > instance is a tuple with 1 or more elements. In addition there is a > second tuple with the same number of elements but different type. This > means getting longer and longer chains of something like (...,x3*x2,x2,0). > > - template haskell? > - CPP and macros? > > Consider arrays with fast access like Data.Vector, but with higher > dimensionality. Basically, I want (!) to fuse when used in Data.Vector > code. (shameless plug) You may want to look at my AdaptiveTuple package, which does something very similar to this. I used Template Haskell because AFAIK neither generic approaches nor DrIFT/Derive will generate data decls. If all you need are the instances, then DrIFT or Derive would be my recommendations. Cheers, John ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users