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/HandleReader.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/HandleReader.hs')
-rw-r--r-- | src/Xmobar/Plugins/HandleReader.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Xmobar/Plugins/HandleReader.hs b/src/Xmobar/Plugins/HandleReader.hs index e1ee6a5..4e5c30e 100644 --- a/src/Xmobar/Plugins/HandleReader.hs +++ b/src/Xmobar/Plugins/HandleReader.hs @@ -19,10 +19,10 @@ where import System.IO ( Handle , hIsEOF + , hGetLine ) import Xmobar.Run.Exec ( Exec(..) ) -import Xmobar.System.Utils ( hGetLineSafe ) -- | A HandleReader displays any text received from a Handle. @@ -59,7 +59,7 @@ instance Read HandleReader where instance Exec HandleReader where -- | Read from the 'Handle' until it is closed. start (HandleReader handle _) cb = - untilM (hIsEOF handle) $ hGetLineSafe handle >>= cb + untilM (hIsEOF handle) $ hGetLine handle >>= cb -- | Use the 2nd argument to HandleReader as its alias. alias (HandleReader _ a) = a |