> My name's Jesse and I'm starting first year computer science this year.
> Our first language is Haskell, which we study for about 6 weeks. Before
> classes start I and a few friends are trying to get a handle on haskell.
>
> We've each tried using your compiler with no luck.
> I have some experience running Linux and using shells but I don't claim
> to be an expert :o)
> Basically my problem is this-
> everything works until I try to cat main.hs
> at which time I get an error 'cat : main.hs : file or directory not
> found'
> I thought it was a path error but when I do 'cat --help' I get a viable
> response, so cat.exe is obviously working. My friends have had the same
> problem.
> If I run 'cat' with no options I get a blank prompt which just copies
> everything I type on a new line.

Hi there,

It's difficult to deduce the cause of your problem, or indeed whether there
is a problem at all, from this description.

cat is not part of GHC; it's part of the operating system. "cat main.hs"
will just display the file main.hs, which is source code. I guess the error
message arose because main.hs was not in the directory you ran cat from.
BTW, to compile main.hs, you would do "ghc -c main.hs -o runme" and then
just type "runme" to execute it.

I highly recommend you avoid GHC until you are more comfortable with
UNIX/Linux. Instead use Hugs, which is interactive, smaller, simpler and
easier to use. You can download it from:

http://www.haskell.org/hugs/

Good luck!

--fac

Reply via email to