data-store-0.3.0.1: Type safe, in-memory dictionary with multidimensional keys.

Safe HaskellNone

Data.Store.Internal.Function

Synopsis

Documentation

genericSubset :: Empty (Index irs ts) => IntSet -> Store tag krs irs ts v -> Store tag krs irs ts vSource

genericLookup :: IntSet -> Store tag krs irs ts v -> [(RawKey krs ts, v)]Source

genericUpdateWithKey :: (Applicative f, Monad f) => (IKey krs ts -> Int -> Store tag krs irs ts e -> f (Store tag krs irs ts e)) -> (RawKey krs ts -> e -> Maybe (e, Maybe (Key krs ts))) -> IntSet -> Store tag krs irs ts e -> f (Store tag krs irs ts e)Source

mergeKeys :: Key krs ts -> IKey krs ts -> IKey krs tsSource

keyInternalToRaw :: IKey krs ts -> RawKey krs tsSource

keyFromInternal :: IKey krs ts -> Key krs tsSource

keyToInternal :: Index irs ts -> Key krs ts -> IKey krs tsSource

genericInsert :: Applicative f => (IKey krs ts -> Int -> Store tag krs irs ts e -> f (Store tag krs irs ts e)) -> IKey krs ts -> e -> Store tag krs irs ts e -> f (Store tag krs irs ts e)Source

indexInsertID :: IKey krs ts -> Int -> Store tag krs irs ts e -> Maybe (Store tag krs irs ts e)Source

Inserts the given element identifier into the store's index under the given internal key.

In case of collisions: returns Nothing.

indexInsertID' :: IKey krs ts -> Int -> Store tag krs irs ts e -> Identity (Store tag krs irs ts e)Source

Inserts the given element identifier into the store's index under the given internal key.

In case of collisions: deletes them.

indexInsertID'' :: IKey krs ts -> Int -> Store tag krs irs ts e -> Identity (Store tag krs irs ts e)Source

UNSAFE. Inserts the given element identifier into the store's index under the given internal key.

In case of collisions: ignores them.

findCollisions :: IKey krs ts -> Index irs ts -> [Int]Source

indexDeleteID :: IKey krs ts -> Int -> Index irs ts -> Index irs tsSource

Deletes EID fron an index.