Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/89ed0822715a767bc16eb98f4a903287872e4f1d >--------------------------------------------------------------- commit 89ed0822715a767bc16eb98f4a903287872e4f1d Author: Ian Lynagh <[email protected]> Date: Tue Jun 19 19:07:33 2012 +0100 Remove Prelude.catch and System.IO.Error.{catch,try} This completes the proposal from trac #4865. >--------------------------------------------------------------- Prelude.hs | 2 +- System/IO/Error.hs | 22 ++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Prelude.hs b/Prelude.hs index 59bffae..6cd70d1 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -141,7 +141,7 @@ module Prelude ( FilePath, readFile, writeFile, appendFile, readIO, readLn, -- ** Exception handling in the I\/O monad - IOError, ioError, userError, catch + IOError, ioError, userError, ) where diff --git a/System/IO/Error.hs b/System/IO/Error.hs index b1fb5ff..4259676 100644 --- a/System/IO/Error.hs +++ b/System/IO/Error.hs @@ -78,15 +78,13 @@ module System.IO.Error ( ioError, -- :: IOError -> IO a catchIOError, -- :: IO a -> (IOError -> IO a) -> IO a - catch, -- :: IO a -> (IOError -> IO a) -> IO a tryIOError, -- :: IO a -> IO (Either IOError a) - try, -- :: IO a -> IO (Either IOError a) modifyIOError, -- :: (IOError -> IOError) -> IO a -> IO a ) where #ifndef __HUGS__ -import qualified Control.Exception.Base as New (catch) +import Control.Exception.Base #endif #ifndef __HUGS__ @@ -141,16 +139,6 @@ tryIOError f = catch (do r <- f return (Right r)) (return . Left) -#ifndef __NHC__ -{-# DEPRECATED try "Please use the new exceptions variant, Control.Exception.try" #-} --- | The 'try' function is deprecated. Please use the new exceptions --- variant, 'Control.Exception.try' from "Control.Exception", instead. -try :: IO a -> IO (Either IOError a) -try f = catch (do r <- f - return (Right r)) - (return . Left) -#endif - #if defined(__GLASGOW_HASKELL__) || defined(__HUGS__) -- ----------------------------------------------------------------------------- -- Constructing an IOError @@ -467,12 +455,6 @@ annotateIOError (NHC.PatternError loc) msg' _ _ = -- Non-I\/O exceptions are not caught by this variant; to catch all -- exceptions, use 'Control.Exception.catch' from "Control.Exception". catchIOError :: IO a -> (IOError -> IO a) -> IO a -catchIOError = New.catch - -{-# DEPRECATED catch "Please use the new exceptions variant, Control.Exception.catch" #-} --- | The 'catch' function is deprecated. Please use the new exceptions --- variant, 'Control.Exception.catch' from "Control.Exception", instead. -catch :: IO a -> (IOError -> IO a) -> IO a -catch = New.catch +catchIOError = catch #endif /* !__HUGS__ */ _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
