From a705d021a8cfbb3b9bbfbec833302768d3ad459e Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 30 Apr 2020 19:56:45 +0530 Subject: Refactor the usage of hGetLineSafe hGetLineSafe is always hGetLine and hence we can directly use it. --- src/Xmobar/Plugins/PipeReader.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Xmobar/Plugins/PipeReader.hs') diff --git a/src/Xmobar/Plugins/PipeReader.hs b/src/Xmobar/Plugins/PipeReader.hs index 9c6e628..1a10abf 100644 --- a/src/Xmobar/Plugins/PipeReader.hs +++ b/src/Xmobar/Plugins/PipeReader.hs @@ -16,7 +16,6 @@ module Xmobar.Plugins.PipeReader(PipeReader(..)) where import System.IO import Xmobar.Run.Exec(Exec(..)) -import Xmobar.System.Utils(hGetLineSafe) import Xmobar.System.Environment(expandEnv) import System.Posix.Files import Control.Concurrent(threadDelay) @@ -34,7 +33,7 @@ instance Exec PipeReader where unless (null def) (cb def) checkPipe pipe h <- openFile pipe ReadWriteMode - forever (hGetLineSafe h >>= cb) + forever (hGetLine h >>= cb) where split c xs | c `elem` xs = let (pre, post) = span (c /=) xs in (pre, dropWhile (c ==) post) -- cgit v1.2.3