Fix GHC warning: -Wunused-local-binds

Related: https://github.com/xmonad/xmonad-contrib/issues/537
This commit is contained in:
slotThe
2021-05-20 12:36:55 +02:00
parent 538089db83
commit 6b014e6025
2 changed files with 6 additions and 8 deletions

View File

@@ -219,10 +219,8 @@ instance Eq a => DecorationStyle TabbedDecoration a where
loc k h i = k + fi ((h * fi i) `div` max 1 (fi $ length ws))
esize k h = fi $ maybe k (\i -> loc k h (i+1) - loc k h i) $ w `elemIndex` ws
wid = esize x wh
hid = esize y hh
n k h = maybe k (loc k h) $ w `elemIndex` ws
nx = n x wh
ny = n y hh
upperTab = Rectangle nx y wid (fi ht)
lowerTab = Rectangle nx (y + fi (hh - ht)) wid (fi ht)
fixHeightLoc i = y + fi (((fi ht) * fi i))

View File

@@ -226,8 +226,8 @@ instance (GetFocused l1 Window, GetFocused l2 Window) => LayoutClass (TMSCombine
(ws', ml') <- runLayout (Workspace wid layout2 s2) r2
let newlayout1 = maybe layout1 id ml
newlayout2 = maybe layout2 id ml'
(f1, str1) = getFocused newlayout1 s1
(f2, str2) = getFocused newlayout2 s2
(f1, _) = getFocused newlayout1 s1
(f2, _) = getFocused newlayout2 s2
fnew = f1 ++ f2
return (ws++ws', Just $ TMSCombineTwo fnew slst1 slst2 vsp nmaster delta frac newlayout1 newlayout2)
@@ -519,7 +519,7 @@ instance (GetFocused l Window, GetFocused r Window) => GetFocused (TMSCombineTwo
in (f1 ++ f2, "TMS: " ++ show f ++ "::" ++ str1 ++ "--" ++ str2)
savFocused i@(TMSCombineTwo f _ _ _ nmaster _ frac lay1 lay2) s =
let (s1,s2,_,_,_) = splitStack f nmaster frac s
(f', mstr) = getFocused i s
(f', _) = getFocused i s
lay1' = savFocused lay1 s1
lay2' = savFocused lay2 s2
in i {focusLst = f', layoutFst=lay1', layoutSnd=lay2'}