Haskell Compiling Problem using GHCi Windows
Question
I have developed a haskell application which is tested with WinHugs interpreter working fine .. 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 ?
Solution
You may want to try this step-by-step guide:
- Save your program in a file
program.hs
this file should contain a functionmain
of the typeIO ()
that is executed at the program's start. - Open a shell in the directory where this file is.
- Type
ghc -O3 --make program.hs
to compileprogram.hs
into an executableprogram.exe
. - Try to run
program.exe
If the error still occurs, please post some more code to aid debugging.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow