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/System/Utils.hs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/Xmobar/System/Utils.hs') diff --git a/src/Xmobar/System/Utils.hs b/src/Xmobar/System/Utils.hs index d4bdd78..227850d 100644 --- a/src/Xmobar/System/Utils.hs +++ b/src/Xmobar/System/Utils.hs @@ -17,7 +17,7 @@ ------------------------------------------------------------------------------ -module Xmobar.System.Utils (expandHome, changeLoop, hGetLineSafe) +module Xmobar.System.Utils (expandHome, changeLoop) where import Control.Monad @@ -27,18 +27,6 @@ import System.Environment import System.FilePath import System.IO -#if defined XFT || defined UTF8 -import qualified System.IO as S (hGetLine) -#endif - -hGetLineSafe :: Handle -> IO String -#if defined XFT || defined UTF8 -hGetLineSafe = S.hGetLine -#else -hGetLineSafe = hGetLine -#endif - - expandHome :: FilePath -> IO FilePath expandHome ('~':'/':path) = fmap ( path) (getEnv "HOME") expandHome p = return p -- cgit v1.2.3