[Haskell-beginners] Parse error. Please, Help me.
aditya siram
aditya.siram at gmail.com
Mon Dec 13 15:35:37 CET 2010
At the top level there shouldn't be any "let ...." so change your:
> let sentenceAry = []
to:
> sentenceAry = []
-deech
On Mon, Dec 13, 2010 at 8:29 AM, Sok H. Chang <shaegis at gmail.com> wrote:
> Hello, everyone.
> I write my second code... but when I compile this, I got an error... (My
> first code works. of course, at that time, I got an indentation error, but I
> could fix it.)
> Haskell>ghc --make Temp.hs -o Temp.exe
> [1 of 1] Compiling Main ( Temp.hs, Temp.o )
> Temp.hs:7:0: parse error (possibly incorrect indentation)
>
> Temp.hs is made using by jEdit on Window XP.
> I install Haskell Platform.
> code is ...
> import System.IO
> import System.Random
> let sentenceAry = []
> main :: IO ()
> main = do inh <- openFile "c:\\Documents and
> Settings\\shaegis\\inputFile.txt" ReadMode
> outh <- openFile "c:\\Documents and Settings\\shaegis\\outputFile.txt"
> WriteMode
> mainloop inh outh
> hClose inh
> hClose outh
> mainloop :: Handle -> Handle -> IO ()
> mainloop inh outh = do ineof <- hIsEOF inh
> if ineof
> then do hPutStrLn outh inpStr
> return ()
> else do inpStr <- hGetLine inh
> let sentenceAry = inpStr : []
> mainloop inh outh
> Please, help me.
> Thank you.
>
> Sincerely, Sok Chang
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
More information about the Beginners
mailing list