manatee-core-0.0.2: The core of Manatee.

Manatee.Toolkit.Data.SetList

Synopsis

Documentation

data Ord a => SetList a Source

Constructors

SetList 

Fields

listCounter :: Int
 
listSet :: Set a
 

setListNew :: Ord a => SetList aSource

New SetList.

setListGetCounter :: Ord a => SetList a -> IntSource

Get counter for SetList.

setListGetNewCounter :: Ord a => SetList a -> (Int, SetList a)Source

Increase counter and then get new counter. Return new setList and new id.

setListSetCounter :: Ord a => SetList a -> Int -> SetList aSource

Set counter.

setListIncCounter :: Ord a => SetList a -> SetList aSource

Increase counter.

setListAddNode :: Ord a => SetList a -> a -> SetList aSource

Add new node in SetList.

setListRemoveNode :: Ord a => SetList a -> a -> SetList aSource

Remove node from SetList.

setListRemoveOthersNode :: Ord a => SetList a -> a -> SetList aSource

Remove others node except current one.

setListGetNode :: Ord a => SetList a -> (a -> Bool) -> Maybe aSource

Find some node and return.

setListGetNodeM :: (Ord a, Monad m) => SetList a -> (a -> m Bool) -> m (Maybe a)Source

Like setListGetNode, but use Monad wrap search condition.

setListEmptySet :: Ord a => SetList a -> SetList aSource

Empty List, but keep counter.

setListGetList :: Ord a => SetList a -> [a]Source

Convert from SetList to list.