From 0fde4c88483c481604c85bc12013cf0828066383 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Wed, 27 Oct 2021 18:06:41 +0100 Subject: [PATCH] Fix Haskell2010 incompatibilities --- XMonad/Actions/PhysicalScreens.hs | 4 ++-- XMonad/Hooks/DebugEvents.hs | 20 ++++++++++---------- XMonad/Layout/NoBorders.hs | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/XMonad/Actions/PhysicalScreens.hs b/XMonad/Actions/PhysicalScreens.hs index 7128468ed6..86e3b29cb1 100644 --- a/XMonad/Actions/PhysicalScreens.hs +++ b/XMonad/Actions/PhysicalScreens.hs @@ -88,8 +88,8 @@ getScreen (ScreenComparator cmpScreen) (P i) = do w <- gets windowset viewScreen :: ScreenComparator -> PhysicalScreen -> X () viewScreen sc p = do i <- getScreen sc p whenJust i $ \s -> do - w <- screenWorkspace s - whenJust w $ windows . W.view + w <- screenWorkspace s + whenJust w $ windows . W.view -- | Send the active window to a given physical screen sendToScreen :: ScreenComparator -> PhysicalScreen -> X () diff --git a/XMonad/Hooks/DebugEvents.hs b/XMonad/Hooks/DebugEvents.hs index 71f0b9110f..cef8fb719d 100644 --- a/XMonad/Hooks/DebugEvents.hs +++ b/XMonad/Hooks/DebugEvents.hs @@ -152,12 +152,12 @@ debugEventsHook' PropertyEvent {ev_window = w a' <- atomName a -- too many of these, and they're not real useful if a' == "_NET_WM_USER_TIME" then return () else do - windowEvent "Property on" w - s' <- case s of - 1 -> return "deleted" - 0 -> dumpProperty a a' w (7 + length a') - _ -> error "Illegal propState; Xlib corrupted?" - say " atom" $ a' ++ s' + windowEvent "Property on" w + s' <- case s of + 1 -> return "deleted" + 0 -> dumpProperty a a' w (7 + length a') + _ -> error "Illegal propState; Xlib corrupted?" + say " atom" $ a' ++ s' debugEventsHook' ExposeEvent {ev_window = w } = @@ -812,10 +812,10 @@ dumpUTF :: Decoder Bool dumpUTF = do uTF8_STRING <- inX $ getAtom "UTF8_STRING" guardType uTF8_STRING $ guardSize 8 $ do - s <- gets value - modify (\r -> r {value = []}) - append . show . decode . map fromIntegral $ s - return True + s <- gets value + modify (\r -> r {value = []}) + append . show . decode . map fromIntegral $ s + return True -- dump an enumerated value using a translation table dumpEnum' :: [String] -> Atom -> Decoder Bool diff --git a/XMonad/Layout/NoBorders.hs b/XMonad/Layout/NoBorders.hs index f536f9c121..69c28ccb21 100644 --- a/XMonad/Layout/NoBorders.hs +++ b/XMonad/Layout/NoBorders.hs @@ -273,10 +273,10 @@ instance SetsAmbiguous Ambiguity where guard $ case amb of OnlyLayoutFloatBelow -> let vu = do - gr <- sr `R.difference` lr - (i2,_w2,wr2) <- ts ++ fs - guard $ i2 < i1 - [wr2 `R.intersects` gr] + gr <- sr `R.difference` lr + (i2,_w2,wr2) <- ts ++ fs + guard $ i2 < i1 + [wr2 `R.intersects` gr] in lr == wr1 && (not . or) vu OnlyLayoutFloat -> lr == wr1