diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-07-24 16:59:27 +0200 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-07-24 16:59:27 +0200 |
commit | 53b55cb7b1f9836daa5ab4c7e31fa784fdfa4c4b (patch) | |
tree | d3207d8135ac1eb15ad2a9ca609929590d38fe51 | |
parent | 3db17331b1d1308f8d9ceb336d1bfef7a91fadc5 (diff) | |
download | metatile-53b55cb7b1f9836daa5ab4c7e31fa784fdfa4c4b.tar metatile-53b55cb7b1f9836daa5ab4c7e31fa784fdfa4c4b.zip |
Remove redundant 'n >= 0' check from shift. (from David Roundy's 'simplify shift, removing unneeded check.' patch)
darcs-hash:20070724145927-a5988-2e681f183964587aedd9d0b1e0ab33f7e25779ba
-rw-r--r-- | StackSet.hs | 2 |
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)) |