开发者

Haskell Compiling Problem using GHCi Windows

I have developed a haskell application which is tested with WinHugs interpreter working fine 开发者_StackOverflow中文版.. when i try to comiple the same application using WinGHCi it prompts a error

   lexical error in string/character literal at character '\t'

I have used \t in IO Program to display text

Example :- putStr "\n \n \t \t Hello ! "

Any solutions ?


You may want to try this step-by-step guide:

  1. Save your program in a file program.hs this file should contain a function main of the type IO () that is executed at the program's start.
  2. Open a shell in the directory where this file is.
  3. Type ghc -O3 --make program.hs to compile program.hs into an executable program.exe.
  4. Try to run program.exe

If the error still occurs, please post some more code to aid debugging.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜