happstack-ixset-6.1.0: Efficient relational queries on Haskell sets.

Safe HaskellSafe-Infered

Happstack.Data.IxSet.Ix

Synopsis

Documentation

data Ix a where

Ix is a Map from some Typeable key to a Set of values for that key. Ix carries type information inside.

Constructors

Ix :: (Typeable key, Ord key) => Map key (Set a) -> (a -> [key]) -> Ix a 

Instances

Typeable1 Ix 
(Data ctx a, Sat (ctx (Ix a))) => Data ctx (Ix a) 
Data a => Data (Ix a) 

insert :: (Ord a, Ord k) => k -> a -> Map k (Set a) -> Map k (Set a)

Convenience function for inserting into Maps of Sets as in the case of an Ix. If they key did not already exist in the Map, then a new Set is added transparently.

delete :: (Ord a, Ord k) => k -> a -> Map k (Set a) -> Map k (Set a)

Convenience function for deleting from Maps of Sets. If the resulting Set is empty, then the entry is removed from the Map.

insertList :: (Ord a, Ord k) => [(k, a)] -> Map k (Set a) -> Map k (Set a)

Helper function to insert a list of elements into a set.

deleteList :: (Ord a, Ord k) => [(k, a)] -> Map k (Set a) -> Map k (Set a)

Helper function to delete a list of elements from a set.

union :: (Ord a, Ord k) => Map k (Set a) -> Map k (Set a) -> Map k (Set a)

Take union of two sets.

intersection :: (Ord a, Ord k) => Map k (Set a) -> Map k (Set a) -> Map k (Set a)

Take intersection of two sets