From 3060c36d00387ed131b4700d97f24afad5fd4122 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Mon, 17 Sep 2007 23:46:58 +0000 Subject: [PATCH] fmt, and tiny comment seeking clarification --- StackSet.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/StackSet.hs b/StackSet.hs index a2f4b31..9a62bb5 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -503,11 +503,12 @@ shift n s | n `tagMember` s && n /= curtag = maybe s go (peek s) where go w = view curtag . insertUp w . view n . delete' w $ s curtag = tag (workspace (current s)) +-- TODO how does this duplicate 'shift's behaviour? shiftWin :: (Ord a, Eq a, Eq s, Eq i) => i -> a -> StackSet i a s sd -> StackSet i a s sd shiftWin n w s | from == Nothing = s | n `tagMember` s && (Just n) /= from = go | otherwise = s - where go = on n (insertUp w) . on (fromJust from) (delete' w) $ s + where go = on n (insertUp w) . on (fromJust from) (delete' w) $ s curtag = tag (workspace (current s)) - from = findIndex w s + from = findIndex w s on i f = view curtag . f . view i