From 965f49612430751d9cccbc92d9d6ccbf28bf0c8b Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 26 Apr 2007 02:57:13 +0200 Subject: Remove toList darcs-hash:20070426005713-a5988-10ed3204d691050d7ce018072d3fcf03221f545e.gz --- StackSet.hs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'StackSet.hs') diff --git a/StackSet.hs b/StackSet.hs index 07a8424..f7ab36f 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -25,7 +25,7 @@ module StackSet ( screen, peekStack, index, empty, peek, push, delete, member, raiseFocus, rotate, promote, shift, view, workspace, fromList, - toList, size, visibleWorkspaces, swap {- helper -} + size, visibleWorkspaces, swap {- helper -} ) where import Data.Maybe @@ -44,10 +44,7 @@ data StackSet i j a = , stacks :: !(M.Map i [a]) -- ^ the separate stacks , focus :: !(M.Map i a) -- ^ the window focused in each stack , cache :: !(M.Map a i) -- ^ a cache of windows back to their stacks - } deriving Eq - -instance (Show i, Show a) => Show (StackSet i j a) where - showsPrec p s r = showsPrec p (show . toList $ s) r + } deriving (Eq, Show) -- The cache is used to check on insertion that we don't already have -- this window managed on another stack @@ -99,10 +96,6 @@ fromList (o,m,xs) = view o $ foldr (\(i,ys) s -> (empty (length xs) m) (zip [0..] xs) --- | toList. Flatten a stackset to a list of lists -toList :: StackSet i j a -> (i,Int,[[a]]) -toList x = (current x, M.size $ screen2ws x, map snd $ M.toList (stacks x)) - -- | Push. Insert an element onto the top of the current stack. -- If the element is already in the current stack, it is moved to the top. -- If the element is managed on another stack, it is removed from that -- cgit v1.2.3