summaryrefslogtreecommitdiffstats
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
commit9134aaf952df72b68c0ea491467ef1a4e8814f5b (patch)
tree87977eacbe169d0a245cab9e75dcbc5a1b620abc
parent87c651bc8d7ee1857bafc2a32a1645f87881dd48 (diff)
downloadmetatile-9134aaf952df72b68c0ea491467ef1a4e8814f5b.tar
metatile-9134aaf952df72b68c0ea491467ef1a4e8814f5b.zip
StackSet.hs: (ensureTags): elaborate into a more descriptive comment.
darcs-hash:20071022202212-bd4d7-103f5a8345112f795767b075368c244f4aedc294
-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