X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=4f01b9ffc3f9e867832001c54e89d0ec536e675d;hb=92411e7c816490869b36b8aa4c37fec985d16756;hp=813d252f5f79f6c85dad7d4050a5636d095d5c88;hpb=fb80d56c0b7617261c93a808e9001bbb25a7562e;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index 813d252..4f01b9f 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -155,8 +155,7 @@ import Data.Tuple #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.IOBase -import GHC.Exception ( throw ) -import GHC.Read +import Text.Read import GHC.Enum import GHC.Num import GHC.Real @@ -165,7 +164,9 @@ import GHC.Show import GHC.Err ( error, undefined ) #endif -import qualified Control.OldException as Old hiding ( throw ) +#ifndef __HUGS__ +import qualified Control.Exception.Base as New (catch) +#endif #ifdef __HUGS__ import Hugs.Prelude @@ -190,6 +191,7 @@ seq :: a -> b -> b seq _ y = y #endif +#ifndef __HUGS__ -- | The 'catch' function establishes a handler that receives any 'IOError' -- raised in the action protected by 'catch'. An 'IOError' is caught by -- the most recent handler established by 'catch'. These handlers are @@ -209,7 +211,5 @@ seq _ y = y -- Non-I\/O exceptions are not caught by this variant; to catch all -- exceptions, use 'Control.Exception.catch' from "Control.Exception". catch :: IO a -> (IOError -> IO a) -> IO a -catch io handler = io `Old.catch` handler' - where handler' (Old.IOException ioe) = handler ioe - handler' e = throw e - +catch = New.catch +#endif /* !__HUGS__ */