aboutsummaryrefslogtreecommitdiffstats
path: root/SwapWorkspaces.hs
diff options
context:
space:
mode:
Diffstat (limited to 'SwapWorkspaces.hs')
-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 }