diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-19 19:07:33 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-19 19:07:33 +0100 |
commit | b08c09208ec1b672654008067cf324f8042ad2bf (patch) | |
tree | a0506c4ae296d5eb5fdfbd3240214593b4a02a52 /libraries/base/System | |
parent | 1befc1929191f61e6008229eab263803c8dcb19b (diff) | |
download | haskell-b08c09208ec1b672654008067cf324f8042ad2bf.tar.gz |
Remove Prelude.catch and System.IO.Error.{catch,try}
This completes the proposal from trac #4865.
Diffstat (limited to 'libraries/base/System')
-rw-r--r-- | libraries/base/System/IO/Error.hs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/libraries/base/System/IO/Error.hs b/libraries/base/System/IO/Error.hs index b1fb5ffbfa..4259676839 100644 --- a/libraries/base/System/IO/Error.hs +++ b/libraries/base/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__ */ |