Fix more GHC warnings: -Wdeprecations

With the bumped xmonad dependency, we can drop these, leaving just 4
warnings visible in ghcid. \o/

Related: https://github.com/xmonad/xmonad/pull/258
This commit is contained in:
Tomas Janousek 2021-06-03 00:01:27 +01:00
parent dac3acc5dd
commit f71095885f
2 changed files with 3 additions and 3 deletions

View File

@ -46,6 +46,6 @@ import XMonad
-- | Execute a named script hook -- | Execute a named script hook
execScriptHook :: String -> X () execScriptHook :: String -> X ()
execScriptHook hook = do execScriptHook hook = do
xmonadDir <- getXMonadDir xmonadDir <- asks (cfgDir . directories)
let script = xmonadDir ++ "/hooks " let script = xmonadDir ++ "/hooks "
spawn (script ++ hook) spawn (script ++ hook)

View File

@ -553,7 +553,7 @@ mkXPromptImplementation historyKey conf om = do
XConf { display = d, theRoot = rw } <- ask XConf { display = d, theRoot = rw } <- ask
s <- gets $ screenRect . W.screenDetail . W.current . windowset s <- gets $ screenRect . W.screenDetail . W.current . windowset
numlock <- gets X.numberlockMask numlock <- gets X.numberlockMask
cachedir <- getXMonadCacheDir cachedir <- asks (cacheDir . directories)
hist <- io $ readHistory cachedir hist <- io $ readHistory cachedir
fs <- initXMF (font conf) fs <- initXMF (font conf)
st' <- io $ st' <- io $
@ -1729,7 +1729,7 @@ historyCompletion = historyCompletionP (const True)
-- name satisfies the given predicate. -- name satisfies the given predicate.
historyCompletionP :: (String -> Bool) -> X ComplFunction historyCompletionP :: (String -> Bool) -> X ComplFunction
historyCompletionP p = do historyCompletionP p = do
cd <- getXMonadCacheDir cd <- asks (cacheDir . directories)
pure $ \x -> pure $ \x ->
let toComplList = deleteConsecutive . filter (isInfixOf x) . M.foldr (++) [] let toComplList = deleteConsecutive . filter (isInfixOf x) . M.foldr (++) []
in toComplList . M.filterWithKey (const . p) <$> readHistory cd in toComplList . M.filterWithKey (const . p) <$> readHistory cd