I am trying to install haskell on xubuntu precise for my haskell class and I cant get it to work. I keep getting 'prelude' module is not available and I have spent hours back and forth installing and uninstalling ghc. Can someone please tell me how to get this thing working. :(

Recommended Answers

All 4 Replies

How exactly did you install GHC? Did you install anything Haskell-related other than the main GHC package? And what's the exact error message you're getting?

Well I tried:
sudo apt-get install ghc
sudo apt-get install haskell-platform
So I thought well I am in, I make a hello.hs folder and try to compile it and i get

kratos@Scylla:~$ runhaskell /hello.hs
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for i386-unknown-linux):
    interactiveUI:setBuffering2

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

kratos@Scylla:~$ ghc -o hello hello.hs

Or when I try ghc -o hello hello.hs I get this:

kratos@Scylla:~/Documents$ ghc -o hello hello.hs

hello.hs:1:1:
    Could not find module `Prelude'
    Use -v to see a list of the files searched for.

So the problem seems to be the 'Prelude' module which I am still googling like crazy and cant seem to find it

To get the look and feel of Haskell, I tried it out from my browser see here

Ok finally after looking up all the sites i could find on google. I did one thing I deleted xubuntu from Virtual box and I found this website and I managed to install the haskell on my system and managed to compile my first haskell program with a 'printf' and not 'print' and so my first error. Here is the blog: http://blog.jasonknight.us/2012/02/how-to-install-ghc-741-in-ubuntu-from.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.