X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Prelude.hs;h=050da0487c10b4c5f12fbe703a95a464dff515d0;hb=b205b53b0078599aa77d9afc759aa333c1f565a1;hp=76bc847a85f6c8044552c4b58f0d7d166c3324bc;hpb=d704979eea6b9a723af54958c8463319b578638a;p=ghc-base.git diff --git a/Prelude.hs b/Prelude.hs index 76bc847..050da04 100644 --- a/Prelude.hs +++ b/Prelude.hs @@ -165,7 +165,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 +192,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 +212,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__ */