Skip to content

Commit

Permalink
Fix GHC warning: -Wunused-local-binds
Browse files Browse the repository at this point in the history
Related: xmonad#537
  • Loading branch information
slotThe committed May 20, 2021
1 parent 538089d commit 6b014e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions XMonad/Layout/Tabbed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ simpleTabbedBottomAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultS
simpleTabbedBottomAlways = tabbedBottomAlways shrinkText def

-- | A side-tabbed layout with the default xmonad Theme.
simpleTabbedLeft, simpleTabbedRight :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker)
simpleTabbedLeft, simpleTabbedRight :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker)
Simplest Window
simpleTabbedLeft = tabbedLeft shrinkText def
simpleTabbedRight = tabbedRight shrinkText def

-- | A side-tabbed layout with the default xmonad Theme.
simpleTabbedLeftAlways, simpleTabbedRightAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker)
simpleTabbedLeftAlways, simpleTabbedRightAlways :: ModifiedLayout (Decoration TabbedDecoration DefaultShrinker)
Simplest Window
simpleTabbedLeftAlways = tabbedLeftAlways shrinkText def
simpleTabbedRightAlways = tabbedRightAlways shrinkText def
Expand Down Expand Up @@ -219,13 +219,11 @@ 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))
fixHeightLoc i = y + fi (((fi ht) * fi i))
fixHeightTab k = Rectangle k
(maybe y (fixHeightLoc)
$ w `elemIndex` ws) (fi wt) (fi ht)
Expand Down
6 changes: 3 additions & 3 deletions XMonad/Layout/TallMastersCombo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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'}
Expand Down

0 comments on commit 6b014e6

Please sign in to comment.