On 3/7/07, Daniel McAllansmith <[EMAIL PROTECTED]> wrote:

Your program actually says:
1) open file handle
2) create a String that will be read _on demand_ from file handle
3) close file handle
4) print the value which is computed from the String

Thanks for a clear explanation and that's also where I've got lost.
Claus' explanation was helpfull too.

I thought that the order things were done is

1) print the value which is computed from rechf
to do so,
2) open file handle
3) create a String ....
4) close file handle

hence my confusion.

I think I kinda understand now what's going on, but the docs are
definitely lacking here :(

by the way, what would be a safe version of hGetContents ? and why
hGetContents is unsafe ?
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to