mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-11 18:21:51 -07:00
don't need 'size' operation on StackSet
This commit is contained in:
11
StackSet.hs
11
StackSet.hs
@@ -25,7 +25,7 @@ module StackSet (
|
|||||||
|
|
||||||
screen, peekStack, index, empty, peek, push, delete, member,
|
screen, peekStack, index, empty, peek, push, delete, member,
|
||||||
raiseFocus, rotate, promote, shift, view, workspace, insert,
|
raiseFocus, rotate, promote, shift, view, workspace, insert,
|
||||||
size, visibleWorkspaces, swap {- helper -}
|
visibleWorkspaces, swap {- helper -}
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
@@ -51,8 +51,9 @@ data StackSet i j a =
|
|||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
-- | /O(n)/. Create a new empty stacks of size 'n', indexed from 0, with 'm'
|
-- | /O(n)/. Create a new stackset, of empty stacks, of size 'n',
|
||||||
-- screens. (also indexed from 0) The 0-indexed stack will be current.
|
-- indexed from 0, with 'm' screens. (also indexed from 0) The 0-indexed
|
||||||
|
-- stack will be current.
|
||||||
empty :: (Integral i, Integral j) => Int -> Int -> StackSet i j a
|
empty :: (Integral i, Integral j) => Int -> Int -> StackSet i j a
|
||||||
empty n m = StackSet { current = 0
|
empty n m = StackSet { current = 0
|
||||||
, screen2ws = wsScrs2Works
|
, screen2ws = wsScrs2Works
|
||||||
@@ -74,8 +75,8 @@ member a w = M.member a (cache w)
|
|||||||
-- lookup x w = M.lookup x (cache w)
|
-- lookup x w = M.lookup x (cache w)
|
||||||
|
|
||||||
-- | /O(n)/. Number of stacks
|
-- | /O(n)/. Number of stacks
|
||||||
size :: StackSet i j a -> Int
|
-- size :: StackSet i j a -> Int
|
||||||
size = M.size . stacks
|
-- size = M.size . stacks
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user