From 0e1c226ee99011d9af202de78e2a7a37511f4b72 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 12 Oct 2009 15:42:13 +0000 Subject: [PATCH] Document that lazy I/O now throws exceptions --- docs/users_guide/6.12.1-notes.xml | 13 +++++++++++++ docs/users_guide/bugs.xml | 24 +++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/docs/users_guide/6.12.1-notes.xml b/docs/users_guide/6.12.1-notes.xml index f1d1ed5..9e0ecbf 100644 --- a/docs/users_guide/6.12.1-notes.xml +++ b/docs/users_guide/6.12.1-notes.xml @@ -692,6 +692,19 @@ ghc --abi-hash M1 M2 ... + Lazy I/O now throws an exception if an error is + encountered, in a divergence from the Haskell 98 spec which + requires that errors are discarded (see Section 21.2.2 of + the Haskell 98 report). The exception thrown is the usual + IO exception that would be thrown if the failing IO + operation was performed in the IO monad, and can be caught + by System.IO.Error.catch + or Control.Exception.catch. + + + + + It is now possible to create your own handles. For more information, see the GHC.IO.Handle haddock docs. diff --git a/docs/users_guide/bugs.xml b/docs/users_guide/bugs.xml index 7fd47c9..6e25e68 100644 --- a/docs/users_guide/bugs.xml +++ b/docs/users_guide/bugs.xml @@ -192,15 +192,21 @@ checking for duplicates. The reason for this is efficiency, pure and simple. - - Strings treated as ISO-8859-1 - - - Various library functions, such as putStrLn, - treat Strings as if they were ISO-8859-1 rather than UTF-8. - - - + + hGetContents + + + Lazy I/O throws an exception if an error is + encountered, in contrast to the Haskell 98 spec which + requires that errors are discarded (see Section 21.2.2 + of the Haskell 98 report). The exception thrown is + the usual IO exception that would be thrown if the + failing IO operation was performed in the IO monad, and can + be caught by System.IO.Error.catch + or Control.Exception.catch. + + + -- 1.7.10.4