diff options
Diffstat (limited to 'src/Plugins/StdinReader.hs')
-rw-r--r-- | src/Plugins/StdinReader.hs | 8 |
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 |