From: simonmar Date: Thu, 13 Apr 2000 08:58:27 +0000 (+0000) Subject: [project @ 2000-04-13 08:58:27 by simonmar] X-Git-Tag: Approximately_9120_patches~4718 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=41c2bcabc10b344f01ba7467292192447695c28f;p=ghc-hetmet.git [project @ 2000-04-13 08:58:27 by simonmar] Move block/unblockAsyncExceptions here, now that they're used in PrelHandle. --- diff --git a/ghc/lib/std/PrelException.lhs b/ghc/lib/std/PrelException.lhs index 5c63069..8b2d17b 100644 --- a/ghc/lib/std/PrelException.lhs +++ b/ghc/lib/std/PrelException.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelException.lhs,v 1.17 2000/04/10 16:02:58 simonpj Exp $ +% $Id: PrelException.lhs,v 1.18 2000/04/13 08:58:27 simonmar Exp $ % % (c) The GRAP/AQUA Project, Glasgow University, 1998 % @@ -211,3 +211,26 @@ ioError err = IO $ \s -> throw (IOException err) s -- the exception when applied to a world \end{code} +%********************************************************* +%* * +\subsection{Controlling asynchronous exception delivery} +%* * +%********************************************************* + +\begin{code} +#ifndef __HUGS__ +blockAsyncExceptions :: IO a -> IO a +blockAsyncExceptions (IO io) = IO $ blockAsyncExceptions# io + +unblockAsyncExceptions :: IO a -> IO a +unblockAsyncExceptions (IO io) = IO $ unblockAsyncExceptions# io +#else +-- Not implemented yet in Hugs. +blockAsyncExceptions :: IO a -> IO a +blockAsyncExceptions (IO io) = IO io + +unblockAsyncExceptions :: IO a -> IO a +unblockAsyncExceptions (IO io) = IO io +#endif +\end{code} +