diff options
Diffstat (limited to '')
-rw-r--r-- | StackSet.hs | 4 |
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)) |