problems with working with Handles

Wolfgang Jeltsch wolfgang@jeltsch.net
Fri, 13 Jun 2003 15:03:01 +0200


On Friday, 2003-06-13, 10:33, CEST, Niels Reyngoud wrote:
> [...]

> To avoid the lazy behaviour, we tried to write our own IO module "IOExts2"
> which basically redifnes readFile, writeFile and appendFile to make sure
> they use binary-mode and strict behaviour. The libary is as follows:
>
> [...]
>
> readFile' :: String -> IO String
> readFile' inputfile = do readhandle <- openFileEx inputfile (BinaryMode
> ReadMode)
>              x <- hGetContents readhandle
>              seq x (return x)

Are you sure you want seq and not deepSeq?

> [...]

Wolfgang