summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--StackSet.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 265359c..29b2a48 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -487,7 +487,7 @@ swapMaster = modify' $ \c -> case c of
-- element on the current stack, the original stackSet is returned.
--
shift :: (Ord a, Eq s, Integral i) => i -> StackSet i a s sd -> StackSet i a s sd
-shift n s = if n >= 0 && n `tagMember` s && n /= curtag
+shift n s = if n `tagMember` s && n /= curtag
then maybe s go (peek s) else s
where go w = view curtag . insertUp w . view n . delete w $ s
curtag = tag (workspace (current s))