summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/BufferedPipeReader.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/BufferedPipeReader.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/BufferedPipeReader.hs')
-rw-r--r--src/Xmobar/Plugins/BufferedPipeReader.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Xmobar/Plugins/BufferedPipeReader.hs b/src/Xmobar/Plugins/BufferedPipeReader.hs
index f98d0d4..cf5a071 100644
--- a/src/Xmobar/Plugins/BufferedPipeReader.hs
+++ b/src/Xmobar/Plugins/BufferedPipeReader.hs
@@ -23,7 +23,6 @@ import System.IO.Unsafe(unsafePerformIO)
import Xmobar.Run.Exec
import Xmobar.System.Signal
import Xmobar.System.Environment
-import Xmobar.System.Utils(hGetLineSafe)
data BufferedPipeReader = BufferedPipeReader String [(Int, Bool, String)]
deriving (Read, Show)
@@ -55,7 +54,7 @@ instance Exec BufferedPipeReader where
reader :: (Int, Bool, FilePath) -> TChan (Int, Bool, String) -> IO ()
reader p@(to, tg, fp) tc = do
fp' <- expandEnv fp
- openFile fp' ReadWriteMode >>= hGetLineSafe >>= \dt ->
+ openFile fp' ReadWriteMode >>= hGetLine >>= \dt ->
atomically $ writeTChan tc (to, tg, dt)
reader p tc