Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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.

share|improve this answer
Something like notepad++ would work. [ ] – Theo Belaire Jan 15 '13 at 14:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.