Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e16528ef41
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (34 sloc) 1.607 kb
Index: archhaskell-habs/haskell-hinotify/src/hinotify-0.3.2/src/System/INotify.hsc
===================================================================
--- archhaskell-habs.orig/haskell-hinotify/src/hinotify-0.3.2/src/System/INotify.hsc
+++ archhaskell-habs/haskell-hinotify/src/hinotify-0.3.2/src/System/INotify.hsc
@@ -1,3 +1,5 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+
-----------------------------------------------------------------------------
-- |
-- Module : System.INotify
@@ -38,7 +40,7 @@ import Prelude hiding (init)
import Control.Monad
import Control.Concurrent
import Control.Concurrent.MVar
-import Control.Exception (bracket)
+import Control.Exception (bracket, catch, SomeException)
import Data.Maybe
import Data.Map (Map)
import qualified Data.Map as Map
@@ -313,13 +315,13 @@ inotify_start_thread h em = do
runHandler (_, e@QOverflow) = do -- send overflows to all handlers
handlers <- readMVar em
flip mapM_ (Map.elems handlers) $ \handler ->
- catch (handler e) (\_ -> return ()) -- supress errors
+ catch (handler e) (\(_ :: SomeException) -> return ()) -- supress errors
runHandler (wd, event) = do
handlers <- readMVar em
let handlerM = Map.lookup wd handlers
case handlerM of
Nothing -> putStrLn "runHandler: couldn't find handler" -- impossible?
- Just handler -> catch (handler event) (\_ -> return ())
+ Just handler -> catch (handler event) (\(_ :: SomeException) -> return ())
killINotify :: INotify -> IO ()
killINotify (INotify h _ _ tid1 tid2) =
Jump to Line
Something went wrong with that request. Please try again.