aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevin Mullins <me@twifkak.com>2007-10-06 07:54:04 +0200
committerDevin Mullins <me@twifkak.com>2007-10-06 07:54:04 +0200
commit2b22daa5d57a04d2a3e04b1c7260d835262b2f20 (patch)
tree40b418dfe0494747137b267839f3499361a47f80
parent3e124ee81623986ef0a0b5e3073b574645e601e7 (diff)
downloadXMonadContrib-2b22daa5d57a04d2a3e04b1c7260d835262b2f20.tar.gz
XMonadContrib-2b22daa5d57a04d2a3e04b1c7260d835262b2f20.tar.xz
XMonadContrib-2b22daa5d57a04d2a3e04b1c7260d835262b2f20.zip
get rid of duplicate mapWorkspaces function
darcs-hash:20071006055404-78224-0f63ff465b5f34f67cfd3ce8466441680fb7714d.gz
-rw-r--r--SwapWorkspaces.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/SwapWorkspaces.hs b/SwapWorkspaces.hs
index 4b404b6..0dbcfb1 100644
--- a/SwapWorkspaces.hs
+++ b/SwapWorkspaces.hs
@@ -45,13 +45,7 @@ swapWithCurrent t s = swapWorkspaces t (tag $ workspace $ current s) s
-- Stole this from StackSet.renameTag -- extracted the traversal code they have in common as mapWorkspaces
swapWorkspaces :: Eq i => i -> i -> StackSet i l a s sd -> StackSet i l a s sd
-swapWorkspaces t1 t2 = mapWorkspaces swap
+swapWorkspaces t1 t2 = mapWorkspace swap
where swap w = if tag w == t1 then w { tag = t2 }
else if tag w == t2 then w { tag = t1 }
else w
-
-mapWorkspaces :: (Workspace i l a -> Workspace i l a) -> StackSet i l a s sd -> StackSet i l a s sd
-mapWorkspaces f s = s { current = updScr $ current s
- , visible = map updScr $ visible s
- , hidden = map f $ hidden s }
- where updScr scr = scr { workspace = f $ workspace scr }