[project @ 2000-04-13 08:58:27 by simonmar]
authorsimonmar <unknown>
Thu, 13 Apr 2000 08:58:27 +0000 (08:58 +0000)
committersimonmar <unknown>
Thu, 13 Apr 2000 08:58:27 +0000 (08:58 +0000)
Move block/unblockAsyncExceptions here, now that they're used in PrelHandle.

ghc/lib/std/PrelException.lhs

index 5c63069..8b2d17b 100644 (file)
@@ -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}
+