[Haskell-beginners] Parse error. Please, Help me.

Sok H. Chang shaegis at gmail.com
Tue Dec 14 03:20:23 CET 2010


Thank you all !!
Have a nice day.

2010/12/13 Magnus Therning <magnus at therning.org>

> On Mon, Dec 13, 2010 at 14:29, 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 = []
>
> That 'let' isn't necessary.
>
> > 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
> >
> >
>
>
>
> --
> Magnus Therning                      OpenPGP: 0xAB4DFBA4
> email: magnus at therning.org   jabber: magnus at therning.org
> twitter: magthe               http://therning.org/magnus
>



-- 
Sok Ha, CHANG
Open Mind Clinic/Academy, 1551-1, Sa-Dong, SangRok-Gu, AnSan-City,
KyongGi-Do
Tel: 031-407-6114
HP: openmind.ac / www.openmind.ac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20101214/3de074e3/attachment.htm>


More information about the Beginners mailing list