summaryrefslogtreecommitdiff
path: root/src/GF/System/NoSignal.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-22 16:46:38 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-22 16:46:38 +0000
commit14f70e478d75050b8dde84a1d79c70e9a471c56b (patch)
tree33d63a8ec9a010178ef4cd34c955e335d79acd8d /src/GF/System/NoSignal.hs
parentb4fe6336af75dbb4e29b27b383f9552497042353 (diff)
version number, encoding
Diffstat (limited to 'src/GF/System/NoSignal.hs')
-rw-r--r--src/GF/System/NoSignal.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/System/NoSignal.hs b/src/GF/System/NoSignal.hs
index 3c2fc6e29..bc0a9fc40 100644
--- a/src/GF/System/NoSignal.hs
+++ b/src/GF/System/NoSignal.hs
@@ -18,4 +18,8 @@ import Control.Exception (Exception)
{-# NOINLINE runInterruptibly #-}
runInterruptibly :: IO a -> IO (Either Exception a)
-runInterruptibly = fmap Right
+--runInterruptibly = fmap Right
+runInterruptibly a =
+ p `catch` h
+ where p = a >>= \x -> return $! Right $! x
+ h e = return $ Left e