From 14f70e478d75050b8dde84a1d79c70e9a471c56b Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 22 Dec 2005 16:46:38 +0000 Subject: version number, encoding --- src/GF/System/NoSignal.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/GF/System') 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 -- cgit v1.2.3