diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-09 07:12:55 +0100 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-09 07:12:55 +0100 |
commit | dc9e17da5048c08190c895f482cbda05456a9934 (patch) | |
tree | 73bbfffdd3940f9faa331e54bd2da96fa3c192c9 /StackSet.hs | |
parent | f2d3bad664167346c048285bb2cd6d69608211a5 (diff) | |
download | xmonad-dc9e17da5048c08190c895f482cbda05456a9934.tar.gz xmonad-dc9e17da5048c08190c895f482cbda05456a9934.tar.xz xmonad-dc9e17da5048c08190c895f482cbda05456a9934.zip |
explicit interface on StackSet. maybe it should be a seperate package ... ?
darcs-hash:20070309061255-9c5c1-77a4933e2d0a3af442eaf820bbff2469347f0a4c.gz
Diffstat (limited to '')
-rw-r--r-- | StackSet.hs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/StackSet.hs b/StackSet.hs index 1cf205d..5ac88b3 100644 --- a/StackSet.hs +++ b/StackSet.hs @@ -19,7 +19,30 @@ -- may be on only 1 screen at any given time. -- -module StackSet {- everything -} where +module StackSet ( + StackSet, -- abstract + + -- * Introduction and elimination + empty, -- :: Int -> StackSet a + fromList, -- :: Ord a => (Int,[[a]]) -> StackSet a + toList, -- :: StackSet a -> (Int,[[a]]) + index, -- :: Int -> StackSet a -> [a] + current, -- :: StackSet a -> Int + + -- * Queries + member, -- :: Ord a => a -> StackSet a -> Bool + size, -- :: StackSet a -> Int + peek, -- :: StackSet a -> Maybe a + + -- * Modifcations + push, -- :: Ord a => a -> StackSet a -> StackSet a + view, -- :: Int -> StackSet a -> StackSet a + rotate, -- :: Ordering -> StackSet a -> StackSet a + shift, -- :: Ord a => Int -> StackSet a -> StackSet a + insert, -- :: Ord a => a -> Int -> StackSet a -> StackSet a + delete, -- :: Ord a => a -> StackSet a -> StackSet a + + ) where import Data.Maybe import qualified Data.List as L (nub,delete) |