I recently started using Haskell Platform. I created a source file using Wordpad and named it add. I tried double clicking it so I can open it in ghci but I get

<[1 of 1] Compiling Main (C:\add.hs,interpeted) C:\add.hs:1:6: parse error on input '\' Failed modules loaded: none.>

What do I do so I can use my source file?. Should I use another text editor?. Thanks

1 Answer 1


Wordpad is what is known as a rich text editor - it uses data embedded in the file to do things like font sizes, typefaces, bolding and italicizing text, and so on.

In general, compilers and interpreters expect plain text files - files containing just the characters they are to parse.

Yes, you should use another editor. Notepad would work, or you could download something a bit more full-featured.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.