summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/System/Utils.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/System/Utils.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/System/Utils.hs')
-rw-r--r--src/Xmobar/System/Utils.hs14
1 files changed, 1 insertions, 13 deletions
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