From fff5ddb53f4eda07c3cbd1caae236e5edd8ea4bc Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Fri, 9 Nov 2012 02:23:16 +0100 Subject: Rename variables "state" to avoid warnings about shadowing Ignore-this: cd063d632412f758ca9fed6393521c8f XMonad core re-exports Control.Monad.State, which includes a function "state" if you happen to use mtl-2. Since there's a chance xmonad still works with mtl-1 avoid imports like: import XMonad hiding (state) darcs-hash:20121109012316-1499c-539514f4cd97ba8b18a8fbfd1a15333b46d962e1.gz --- XMonad/Layout/WindowNavigation.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'XMonad/Layout/WindowNavigation.hs') diff --git a/XMonad/Layout/WindowNavigation.hs b/XMonad/Layout/WindowNavigation.hs index 5587b73..0244532 100644 --- a/XMonad/Layout/WindowNavigation.hs +++ b/XMonad/Layout/WindowNavigation.hs @@ -105,7 +105,7 @@ configurableNavigation :: LayoutClass l a => WNConfig -> l a -> ModifiedLayout W configurableNavigation conf = ModifiedLayout (WindowNavigation conf (I Nothing)) instance LayoutModifier WindowNavigation Window where - redoLayout (WindowNavigation conf (I state)) rscr (Just s) origwrs = + redoLayout (WindowNavigation conf (I st)) rscr (Just s) origwrs = do XConf { normalBorder = nbc, focusedBorder = fbc, display = dpy } <- ask [uc,dc,lc,rc] <- case brightness conf of @@ -120,8 +120,8 @@ instance LayoutModifier WindowNavigation Window where let w = W.focus s r = case filter ((==w).fst) origwrs of ((_,x):_) -> x [] -> rscr - pt = case state of Just (NS ptold _) | ptold `inrect` r -> ptold - _ -> center r + pt = case st of Just (NS ptold _) | ptold `inrect` r -> ptold + _ -> center r existing_wins = W.integrate s wrs = filter ((`elem` existing_wins) . fst) $ filter ((/=r) . snd) $ filter ((/=w) . fst) origwrs @@ -130,8 +130,8 @@ instance LayoutModifier WindowNavigation Window where wnavigablec = nub $ concatMap (\d -> map (\(win,_) -> (win,dirc d)) $ take 1 $ navigable d pt wrs) [U,D,R,L] - wothers = case state of Just (NS _ wo) -> map fst wo - _ -> [] + wothers = case st of Just (NS _ wo) -> map fst wo + _ -> [] mapM_ (sc nbc) (wothers \\ map fst wnavigable) mapM_ (\(win,c) -> sc c win) wnavigablec return (origwrs, Just $ WindowNavigation conf $ I $ Just $ NS pt wnavigable) -- cgit v1.2.3