From 69a251e1e7a1f198b3bf713a28955c676029aa1f Mon Sep 17 00:00:00 2001 From: Alexander Polakov Date: Wed, 13 Mar 2013 20:40:33 +0400 Subject: Help type inferencer a bit, kills warning --- src/Xmobar.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Xmobar.hs b/src/Xmobar.hs index e61dc43..3cff475 100644 --- a/src/Xmobar.hs +++ b/src/Xmobar.hs @@ -243,10 +243,11 @@ updateActions :: XConf -> Rectangle -> [[(Widget, String, Maybe Action)]] -> IO [(Action, Position, Position)] updateActions conf (Rectangle _ _ wid _) ~[left,center,right] = do let (d,fs) = (display &&& fontS) conf + strLn :: [(Widget, String, Maybe Action)] -> IO [(Maybe Action, Position, Position)] strLn = io . mapM getCoords iconW i = maybe 0 Bitmap.width (lookup i $ iconS conf) - getCoords (Text s,_,a) = textWidth d fs s >>= \tw -> return (a,0,fi tw) - getCoords (Icon s,_,a) = return (a,0,fi $ iconW s) + getCoords (Text s,_,a) = textWidth d fs s >>= \tw -> return (a, 0, fi tw) + getCoords (Icon s,_,a) = return (a, 0, fi $ iconW s) partCoord off xs = map (\(a, x, x') -> (fromJust a, x, x')) $ filter (\(a, _,_) -> a /= Nothing) $ scanl (\(_,_,x') (a,_,w') -> (a, x', x' + w')) (Nothing, 0, off) xs -- cgit v1.2.3