diff options
author | Sibi Prabakaran <sibi@psibi.in> | 2020-04-30 19:56:45 +0530 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-04-30 16:45:31 +0100 |
commit | a705d021a8cfbb3b9bbfbec833302768d3ad459e (patch) | |
tree | 6d52eecacdc3d2536ac83a3c6e0ca8f3f0412bd2 /src/Xmobar/Plugins/StdinReader.hs | |
parent | b0591c5e4c483aa47ef74ab25448c56cf6e3a82a (diff) | |
download | xmobar-a705d021a8cfbb3b9bbfbec833302768d3ad459e.tar.gz xmobar-a705d021a8cfbb3b9bbfbec833302768d3ad459e.tar.bz2 |
Refactor the usage of hGetLineSafe
hGetLineSafe is always hGetLine and hence we can directly use it.
Diffstat (limited to 'src/Xmobar/Plugins/StdinReader.hs')
-rw-r--r-- | src/Xmobar/Plugins/StdinReader.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Xmobar/Plugins/StdinReader.hs b/src/Xmobar/Plugins/StdinReader.hs index 4b80044..5a8b2be 100644 --- a/src/Xmobar/Plugins/StdinReader.hs +++ b/src/Xmobar/Plugins/StdinReader.hs @@ -25,7 +25,6 @@ import System.IO import Control.Exception (SomeException(..), handle) import Xmobar.Run.Exec import Xmobar.X11.Actions (stripActions) -import Xmobar.System.Utils (hGetLineSafe) data StdinReader = StdinReader | UnsafeStdinReader deriving (Read, Show) @@ -33,7 +32,7 @@ data StdinReader = StdinReader | UnsafeStdinReader instance Exec StdinReader where start stdinReader cb = do s <- handle (\(SomeException e) -> do hPrint stderr e; return "") - (hGetLineSafe stdin) + (hGetLine stdin) cb $ escape stdinReader s eof <- isEOF if eof |