File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1602,9 +1602,9 @@ illegalBufferSize handle fn sz =
16021602-- File handles are closed on EOF if all the file is read, or through
16031603-- garbage collection otherwise.
16041604--
1605- -- Do not use this function inside a 'Control.Exception.bracket' \/
1605+ -- Beware of using this function inside of 'Control.Exception.bracket' \/
16061606-- 'System.IO.withFile' \/ 'System.IO.withBinaryFile':
1607- -- lazy I/O will escape it causing 'Control.Exception.bracket' to close a handle prematurely:
1607+ -- lazy I/O can easily escape it causing 'Control.Exception.bracket' to close a handle prematurely:
16081608--
16091609-- >>> withBinaryFile "foo.txt" ReadMode BL.hGetContents >>= print
16101610-- "*** Exception: foo.txt: hGetBufSome: illegal operation (handle is closed)
You can’t perform that action at this time.
0 commit comments