Newbie problem: lexical error when compiling

David Schonberger llp_yyz at
Sun Sep 16 12:59:19 EDT 2007

I'm new to GHC and am having a problem compiling a simple test program. I recently installed ghc 6.6.1 on my Windows Vista machine. I can ghci ok. For instance, I defined the factorial function and tested it on a few values. So the interpreter seems to work fine. As a next step I created a file called hello.hs (UTF-8 encoding) containing the single line: main = putStrLn "Hello world!" I opened a windows console, navigated to the folder containing this Haskell file and typed 
'ghc -o hello hello.hs' and received the following error: hello.hs:1:0 lexical error at character '\65279'. If I type 'ghc -o hello.exe hello.hs' I get the same error. Anybody know what the problem is here and how to fix it? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Glasgow-haskell-users mailing list