aboutsummaryrefslogtreecommitdiffstats
path: root/StackSet.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-07-24 17:23:40 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-07-24 17:23:40 +0200
commit78d4f03d2923a1a1c661361b92a170351fedd72b (patch)
tree0a0b046b65e981b7ac6c0fa2f62da3e8dec76568 /StackSet.hs
parented3b51f85d5c36b334282ed34ecd5ca87c29a4a2 (diff)
downloadxmonad-78d4f03d2923a1a1c661361b92a170351fedd72b.tar.gz
xmonad-78d4f03d2923a1a1c661361b92a170351fedd72b.tar.xz
xmonad-78d4f03d2923a1a1c661361b92a170351fedd72b.zip
shift: use guards instead of if
darcs-hash:20070724152340-a5988-dec59fcb145282845349ec5baf700b62a25ac116.gz
Diffstat (limited to 'StackSet.hs')
-rw-r--r--StackSet.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 3951ec2..e6b2996 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -474,7 +474,7 @@ swapMaster = modify' $ \c -> case c of
-- element on the current stack, the original stackSet is returned.
--
shift :: (Ord a, Eq s, Eq i) => i -> StackSet i a s sd -> StackSet i a s sd
-shift n s = if n `tagMember` s && n /= curtag
- then maybe s go (peek s) else s
+shift n s | n `tagMember` s && n /= curtag = maybe s go (peek s)
+ | otherwise = s
where go w = view curtag . insertUp w . view n . delete w $ s
curtag = tag (workspace (current s))