]> woffs.de Git - fd/haskell-amqp-utils.git/blobdiff - agitprop.hs
formatting
[fd/haskell-amqp-utils.git] / agitprop.hs
index 4b2aa43727f31f740962e84a7f54e4b55b9a3c7a..80585b61772cccf4c2366a6e6be140bfa643b8d3 100644 (file)
@@ -1,4 +1,5 @@
 {-# LANGUAGE CPP #-}
+
 -- generic AMQP publisher
 import Control.Concurrent
 import qualified Control.Exception as X
@@ -93,8 +94,10 @@ main = do
 
 -- | A handler for clean exit
 exceptionHandler :: AMQPException -> IO ()
-exceptionHandler (ChannelClosedException Normal txt) = printparam "exit" txt >> exitWith ExitSuccess
-exceptionHandler (ConnectionClosedException Normal txt) = printparam "exit" txt >> exitWith ExitSuccess
+exceptionHandler (ChannelClosedException Normal txt) =
+  printparam "exit" txt >> exitWith ExitSuccess
+exceptionHandler (ConnectionClosedException Normal txt) =
+  printparam "exit" txt >> exitWith ExitSuccess
 exceptionHandler x = printparam "exception" x >> exitWith (ExitFailure 1)
 
 -- | The handler for publisher confirms
@@ -118,8 +121,10 @@ handleEvent ::
   -> IO ()
 -- just handle closewrite and movedin events
 #if MIN_VERSION_hinotify(0,3,10)
-handleEvent f s p (Closed False (Just x) True) = handleFile f s (p ++ "/" ++ (BS.unpack x))
-handleEvent f s p (MovedIn False x _) = handleFile f s (p ++ "/" ++ (BS.unpack x))
+handleEvent f s p (Closed False (Just x) True) =
+  handleFile f s (p ++ "/" ++ (BS.unpack x))
+handleEvent f s p (MovedIn False x _) =
+  handleFile f s (p ++ "/" ++ (BS.unpack x))
 #else
 handleEvent f s p (Closed False (Just x) True) = handleFile f s (p ++ "/" ++ x)
 handleEvent f s p (MovedIn False x _) = handleFile f s (p ++ "/" ++ x)