summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/StdinReader.hs
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-10-08 00:02:05 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-10-08 00:02:05 +0200
commit44f99f3ed3a6af5a2289765fadf4df29887db5c2 (patch)
tree43c779aefe8828355dfbd8399f67af10b2186808 /src/Plugins/StdinReader.hs
parentb24a91af8d6a1f7b38012092ee786895b8b6a318 (diff)
downloadxmobar-44f99f3ed3a6af5a2289765fadf4df29887db5c2.tar.gz
xmobar-44f99f3ed3a6af5a2289765fadf4df29887db5c2.tar.bz2
Fixes for warnings reported in github issue #71
Diffstat (limited to 'src/Plugins/StdinReader.hs')
-rw-r--r--src/Plugins/StdinReader.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Plugins/StdinReader.hs b/src/Plugins/StdinReader.hs
index 935d76a..fddd0bc 100644
--- a/src/Plugins/StdinReader.hs
+++ b/src/Plugins/StdinReader.hs
@@ -14,11 +14,11 @@
module Plugins.StdinReader where
-import Prelude hiding (catch)
+import Prelude
import System.Posix.Process
import System.Exit
import System.IO
-import Control.Exception (SomeException(..),catch)
+import Control.Exception (SomeException(..), handle)
import Plugins
data StdinReader = StdinReader
@@ -26,8 +26,8 @@ data StdinReader = StdinReader
instance Exec StdinReader where
start StdinReader cb = do
- cb =<< catch (hGetLineSafe stdin)
- (\(SomeException e) -> do hPrint stderr e; return "")
+ cb =<< handle (\(SomeException e) -> do hPrint stderr e; return "")
+ (hGetLineSafe stdin)
eof <- hIsEOF stdin
if eof
then exitImmediately ExitSuccess