aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2007-10-22 22:22:12 +0200
committerBrent Yorgey <byorgey@gmail.com>2007-10-22 22:22:12 +0200
commite8928472be87183609883032a09fe01dfb3195b6 (patch)
tree87977eacbe169d0a245cab9e75dcbc5a1b620abc
parent56fc64cfc1f2525ad64f27c9727e9ca0fe3f3655 (diff)
downloadxmonad-e8928472be87183609883032a09fe01dfb3195b6.tar.gz
xmonad-e8928472be87183609883032a09fe01dfb3195b6.tar.xz
xmonad-e8928472be87183609883032a09fe01dfb3195b6.zip
StackSet.hs: (ensureTags): elaborate into a more descriptive comment.
darcs-hash:20071022202212-bd4d7-103f5a8345112f795767b075368c244f4aedc294.gz
-rw-r--r--StackSet.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 95ff29f..221e123 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -413,7 +413,9 @@ renameTag :: Eq i => i -> i -> StackSet i l a s sd -> StackSet i l a s sd
renameTag o n = mapWorkspace rename
where rename w = if tag w == o then w { tag = n } else w
--- | Ensure that a given set of tags is present.
+-- | Ensure that a given set of workspace tags is present by renaming
+-- existing workspaces and/or creating new hidden workspaces as
+-- necessary.
ensureTags :: Eq i => l -> [i] -> StackSet i l a s sd -> StackSet i l a s sd
ensureTags l allt st = et allt (map tag (workspaces st) \\ allt) st
where et [] _ s = s