From: Malcolm.Wallace@me.com Date: Sat, 10 Jul 2010 17:09:40 +0000 (+0000) Subject: Allow nhc98 to cope with recent changes to Control.Exception. X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9699d43eb2988a838c786927c3a874169a17d71e;hp=4c29f6f110d23b890567b8696a964bb212eba52e;p=ghc-base.git Allow nhc98 to cope with recent changes to Control.Exception. --- 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__