Skip to content

Commit

Permalink
Fix Haskell2010 incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
liskin committed Oct 27, 2021
1 parent 991dc6d commit 0fde4c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions XMonad/Actions/PhysicalScreens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
20 changes: 10 additions & 10 deletions XMonad/Hooks/DebugEvents.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
} =
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions XMonad/Layout/NoBorders.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0fde4c8

Please sign in to comment.