summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/HandleReader.hs
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-04-30 19:56:45 +0530
committerjao <jao@gnu.org>2020-04-30 16:45:31 +0100
commita705d021a8cfbb3b9bbfbec833302768d3ad459e (patch)
tree6d52eecacdc3d2536ac83a3c6e0ca8f3f0412bd2 /src/Xmobar/Plugins/HandleReader.hs
parentb0591c5e4c483aa47ef74ab25448c56cf6e3a82a (diff)
downloadxmobar-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.hs4
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