diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-08 13:07:53 +0100 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-08 13:07:53 +0100 |
commit | 2bd7c02914eba59d1f2f39388c437e22979d5167 (patch) | |
tree | 761f162516935138fca79cfc826a7a9b253b247b | |
parent | 8a8dead5df44da13a447322b1c71dd37af8b1a28 (diff) | |
download | xmonad-2bd7c02914eba59d1f2f39388c437e22979d5167.tar.gz xmonad-2bd7c02914eba59d1f2f39388c437e22979d5167.tar.xz xmonad-2bd7c02914eba59d1f2f39388c437e22979d5167.zip |
comments
darcs-hash:20070308120753-9c5c1-89f1c06d6a8f0425701139fe426f08e1cdda42a3.gz
Diffstat (limited to '')
-rw-r--r-- | WMonad.hs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -67,14 +67,15 @@ trace msg = io $ do hPutStrLn stderr msg hFlush stderr --- | Modify the workspace list +-- | Modify the workspace list. modifyWorkspace :: (WorkSpace -> WorkSpace) -> W () modifyWorkspace f = do modify $ \s -> s { workspace = f (workspace s) } ws <- gets workspace - trace (show $ ws) + trace (show ws) -- log state changes to stderr --- | Like 'when' but for (WorkSpace -> Maybe a) +-- | Run a side effecting action with the current workspace. Like 'when' but +-- for (WorkSpace -> Maybe a). whenJust :: (WorkSpace -> Maybe a) -> (a -> W ()) -> W () whenJust mg f = do ws <- gets workspace |