From d3b0a9951d509967ce6bdd7580e1cd083fdb6035 Mon Sep 17 00:00:00 2001 From: John Tyree Date: Wed, 9 Oct 2019 17:39:19 -0700 Subject: Fix type errors in MPD plugin --- src/Xmobar/Plugins/Monitors/MPD.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Xmobar') diff --git a/src/Xmobar/Plugins/Monitors/MPD.hs b/src/Xmobar/Plugins/Monitors/MPD.hs index 9525254..b6d154a 100644 --- a/src/Xmobar/Plugins/Monitors/MPD.hs +++ b/src/Xmobar/Plugins/Monitors/MPD.hs @@ -99,13 +99,13 @@ parseMPD (Right st) song opts = do si = stateGlyph s opts vol = int2str $ fromMaybe 0 (M.stVolume st) (p, t) = fromMaybe (0, 0) (M.stTime st) - [lap, len, remain] = map showTime [floor p, t, max 0 (t - floor p)] - b = if t > 0 then realToFrac $ p / fromIntegral t else 0 + [lap, len, remain] = map showTime [floor p, floor t, max 0 (floor t - floor p)] + b = if t > 0 then realToFrac $ p / t else 0 plen = int2str $ M.stPlaylistLength st ppos = maybe "" (int2str . (+1)) $ M.stSongPos st flags = playbackMode st -stateGlyph :: M.State -> MOpts -> String +stateGlyph :: M.PlaybackState -> MOpts -> String stateGlyph s o = case s of M.Playing -> mPlaying o -- cgit v1.2.3