Hi,
Trying to get aprogram to count all the lines or words from a file. Not sure about the syntax. Probably missing some.
Here's what I have so far any help in the right direction would be great.
import System.IO
main :: IO ()
main = do
incom <- openFile "file.txt" ReadMode
otcom <- openFile "prob.txt" WriteMode
fCount incom otcom
hClose incom
hClose otcom
fCount incomh otcomh =
do eof <- hIsEof incomh
if eof
then return()
else do c <- hGetCount incom
it tells me parse error on =
John