From 9699d43eb2988a838c786927c3a874169a17d71e Mon Sep 17 00:00:00 2001 From: "Malcolm.Wallace@me.com" Date: Sat, 10 Jul 2010 17:09:40 +0000 Subject: [PATCH] Allow nhc98 to cope with recent changes to Control.Exception. --- Control/Exception.hs | 2 ++ Control/Exception/Base.hs | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Control/Exception.hs b/Control/Exception.hs index bbcc490..d5d0e4c 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -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 diff --git a/Control/Exception/Base.hs b/Control/Exception/Base.hs index a11ff68..525dc6a 100644 --- a/Control/Exception/Base.hs +++ b/Control/Exception/Base.hs @@ -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__ -- 1.7.10.4