diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-11-15 03:53:01 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-11-15 03:53:01 +0100 |
commit | a0b42ff9d7120d6ae202365ada3893be6480144c (patch) | |
tree | 5cf4257040cedb15419673158440fc8bb4d121dd /XMonad | |
parent | 2c98d5504bf44706ea7ee9747526dd652bc7824e (diff) | |
download | XMonadContrib-a0b42ff9d7120d6ae202365ada3893be6480144c.tar.gz XMonadContrib-a0b42ff9d7120d6ae202365ada3893be6480144c.tar.xz XMonadContrib-a0b42ff9d7120d6ae202365ada3893be6480144c.zip |
Use io instead of liftIO in Prompt
Ignore-this: cd4031b74cd5bb874cd2c3cc2cb087f2
darcs-hash:20091115025301-1499c-992bfa7612baa7b5c6c992208b12eb2e06df50d9.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Prompt.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index a84decc..17a628d 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -269,24 +269,24 @@ mkXPromptWithReturn t conf compl action = do c <- ask let d = display c rw = theRoot c - s <- gets $ screenRect . W.screenDetail . W.current . windowset - hist <- liftIO readHistory - w <- liftIO $ createWin d rw conf s - liftIO $ selectInput d w $ exposureMask .|. keyPressMask - gc <- liftIO $ createGC d w - liftIO $ setGraphicsExposures d gc False + s <- gets $ screenRect . W.screenDetail . W.current . windowset + hist <- io readHistory + w <- io $ createWin d rw conf s + io $ selectInput d w $ exposureMask .|. keyPressMask + gc <- io $ createGC d w + io $ setGraphicsExposures d gc False fs <- initXMF (font conf) numlock <- asks $ X.numlockMask . X.config let hs = fromMaybe [] $ M.lookup (showXPrompt t) hist st = (initState d rw w s compl gc fs (XPT t) hs conf) { numlockMask = numlock } - st' <- liftIO $ execStateT runXP st + st' <- io $ execStateT runXP st releaseXMF fs - liftIO $ freeGC d gc + io $ freeGC d gc if successful st' then do - liftIO $ writeHistory $ M.insertWith + io $ writeHistory $ M.insertWith (\xs ys -> take (historySize conf) . historyFilter conf $ xs ++ ys) (showXPrompt t) (historyFilter conf [command st']) |