[Haskell-cafe] Semi-closed handles and I/O errors: misleading documentation?
diaz.carrete at gmail.com
Sun Nov 29 17:00:09 UTC 2015
In the documentation for System.IO
find the following assertion:
Any I/O errors encountered while a handle is semi-closed are simply
also this other one:
Encoding and decoding errors are always detected and reported, except
during lazy I/O (hGetContents, getContents, and readFile), where a decoding
error merely results in termination of the character stream, as with other
Is this really correct, though? This SO question
says that exceptions found during lazy I/O are thrown from pure code, and a small
experiment <http://stackoverflow.com/a/33985047/1364288> seems to confirm
it. I personally prefer that behaviour, by the way.
Perhaps the documentation should be updated?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe