On Mon, 6 Dec 1999, c_stanto wrote: > > here is my code and I am guess that the problem is that openFile returns > an IO Handle and getContents takes just a Handle. How do I go about > fixing this? > > > module Main(main) where > > import IO > > main = putStrLn (getContents (openFile "./joseph.txt" ReadMode)) > why not just: main = readFile "./joseph.txt" >>= putStrLn (Think of >>= as a unix pipe | ) /Lars L
- file manipulation c_stanto
- file manipulation Tom Pledger
- Lars Lundgren
