summaryrefslogtreecommitdiff
path: root/src/GF/System/UseSignal.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-04-30 05:13:55 +0000
committerkrasimir <krasimir@chalmers.se>2009-04-30 05:13:55 +0000
commitc6ac4801ad271ac2b7c093ce77172930529a1fb1 (patch)
tree926faede59c9838c58e384402ffe9bef2a9bf87d /src/GF/System/UseSignal.hs
parentc14a899ab49167b025c1cc744af1e9694682c1bc (diff)
upgrade to GHC 6.10.2
Diffstat (limited to 'src/GF/System/UseSignal.hs')
-rw-r--r--src/GF/System/UseSignal.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/System/UseSignal.hs b/src/GF/System/UseSignal.hs
index 628f5888d..20c70a568 100644
--- a/src/GF/System/UseSignal.hs
+++ b/src/GF/System/UseSignal.hs
@@ -16,7 +16,7 @@
module GF.System.UseSignal where
import Control.Concurrent (myThreadId, killThread)
-import Control.Exception (Exception,catch)
+import Control.Exception (SomeException,catch)
import Prelude hiding (catch)
import System.IO
@@ -48,10 +48,10 @@ myIgnore = Ignore
-- unsafeInterleaveIO etc.) the lazy computation will
-- not be interruptible, as it will be performed
-- after the signal handler has been removed.
-runInterruptibly :: IO a -> IO (Either Exception a)
+runInterruptibly :: IO a -> IO (Either SomeException a)
runInterruptibly a =
do t <- myThreadId
- oldH <- myInstallHandler (myCatch (print "Seek and Destroy" >> killThread t))
+ oldH <- myInstallHandler (myCatch (killThread t))
x <- p `catch` h
myInstallHandler oldH
return x
@@ -66,7 +66,7 @@ runInterruptibly_ = fmap (either (const ()) id) . runInterruptibly
-- | Run an action with SIGINT blocked.
blockInterrupt :: IO a -> IO a
blockInterrupt a =
- do oldH <- myInstallHandler Ignore
+ do oldH <- myInstallHandler myIgnore
x <- a
myInstallHandler oldH
return x