Allow nhc98 to cope with recent changes to Control.Exception.
authorMalcolm.Wallace@me.com <unknown>
Sat, 10 Jul 2010 17:09:40 +0000 (17:09 +0000)
committerMalcolm.Wallace@me.com <unknown>
Sat, 10 Jul 2010 17:09:40 +0000 (17:09 +0000)
Control/Exception.hs
Control/Exception/Base.hs

index bbcc490..d5d0e4c 100644 (file)
@@ -108,11 +108,13 @@ module Control.Exception (
         -- asynchronous exceptions during a critical region.
 
         mask,
+#ifndef __NHC__
         mask_,
         uninterruptibleMask,
         uninterruptibleMask_,
         MaskingState(..),
         getMaskingState,
+#endif
 
         -- ** (deprecated) Asynchronous exception control
 
index a11ff68..525dc6a 100644 (file)
@@ -78,13 +78,14 @@ module Control.Exception.Base (
         -- * Asynchronous Exceptions
 
         -- ** Asynchronous exception control
-
         mask,
+#ifndef __NHC__
         mask_,
         uninterruptibleMask,
         uninterruptibleMask_,
         MaskingState(..),
         getMaskingState,
+#endif
 
         -- ** (deprecated) Asynchronous exception control
 
@@ -223,6 +224,10 @@ assert :: Bool -> a -> a
 assert True  x = x
 assert False _ = throw (toException (UserError "" "Assertion failed"))
 
+mask   :: ((IO a-> IO a) -> IO a) -> IO a
+mask action = action restore
+    where restore act = act
+
 #endif
 
 #ifdef __HUGS__