[Haskell-beginners] Follow up to reference request

Alan Cameron alan.cameron at iname.com
Mon Jan 26 17:22:05 EST 2009


Hi,

I am indebted to Andrew Wagner for pointing me in the direction of the book
http://book.realworldhaskell.org/read/
Which I now have time to study. Everything was going fine until I got to the
section in Getting Started where it gives A Simple Program.

Now as someone who is used to the Windows environment CLI is not my forte.
Following instructions which appear to be incomplete I created a file of the
program WC.hs but where should it go?

I tried various places until I reread the :? For the :cd command.
Ah I said that's what I need to do put it in a folder and change the Dir.

Now I can find the file with the :edit command.
Did the same with the file quux.txt same place.

Now run the command $ runghc WC < quux.txt

<interactive>:1:0: parse error on input '$'

What have I done wrong or not done?

It does say "at a shell or command prompt" what's that??

I reverted to the installation instructions provided by GHC for Windows.
2.2 Installing on Windows
2.2.1 Installing GHC on Windows

Checked all that had been done correctly.

Enter the program line 1>

bash$ cat main.hs
<interactive>:1:0: parse error on input '$'

Now bash looks like a modified prompt??
So what is happening?

Regards to all and TIA for reply.

Alan Cameron





More information about the Beginners mailing list