[project @ 2000-07-07 11:03:57 by simonmar]
Rearrange exception stuff, as per my message on glasgow-haskell-users
recently.
The main change is the IOError type is now a synonym for Exception.
IO.ioError can therefore be used for throwing exceptions. IO.catch
still catches only IO exceptions, for backwards compatibility.
The interface exported by Exception has changed somewhat:
try :: IO a -> IO (Either Exception a)
tryJust :: (Exception -> Maybe b) -> a -> IO (Either b a)
catch :: IO a -> (Exception -> IO a) -> IO a
catchJust :: (Exception -> Maybe b) -> IO a -> (b -> IO a) -> IO a
ioErrors :: Exception -> Maybe IOError
arithExceptions :: Exception -> Maybe ArithException
errorCalls :: Exception -> Maybe String
dynExceptions :: Exception -> Maybe Dynamic
assertions :: Exception -> Maybe String
asyncExceptions :: Exception -> Maybe AsyncException
raiseInThread is now called throwTo.
Where possible, the old functions have been left around, but marked
deprecated.
15 files changed: