Safe Haskell | None |
---|---|

Language | Haskell2010 |

An implementation of heterogeneous tree-map by open unions.
This module uses the `Data.IntMap`

inside,
see also https://hackage.haskell.org/package/containers.

- data UnionIntMap r
- (\\) :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r
- (!) :: Member a as => UnionIntMap as -> Key -> a
- empty :: UnionIntMap r
- singleton :: Member a as => Key -> a -> UnionIntMap as
- null :: UnionIntMap r -> Bool
- size :: UnionIntMap r -> Int
- member :: Key -> UnionIntMap r -> Bool
- notMember :: Key -> UnionIntMap r -> Bool
- lookup :: Member a as => Key -> UnionIntMap as -> Maybe a
- lookupU :: Key -> UnionIntMap r -> Maybe (Union r)
- find :: Member a as => Key -> UnionIntMap as -> a
- findU :: Key -> UnionIntMap r -> Union r
- findWithDefault :: Member a as => a -> Key -> UnionIntMap as -> a
- insert :: Member a as => Key -> a -> UnionIntMap as -> UnionIntMap as
- insertWith :: Member a as => (a -> a -> a) -> Key -> a -> UnionIntMap as -> UnionIntMap as
- insertWithKey :: Member a as => (Key -> a -> a -> a) -> Key -> a -> UnionIntMap as -> UnionIntMap as
- delete :: Key -> UnionIntMap as -> UnionIntMap as
- adjust :: Member a as => (a -> a) -> Key -> UnionIntMap as -> UnionIntMap as
- adjustWithKey :: Member a as => (Key -> a -> a) -> Key -> UnionIntMap as -> UnionIntMap as
- update :: Member a as => (a -> Maybe a) -> Key -> UnionIntMap as -> UnionIntMap as
- updateWithKey :: Member a as => (Key -> a -> Maybe a) -> Key -> UnionIntMap as -> UnionIntMap as
- union :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r
- unions :: [UnionIntMap r] -> UnionIntMap r
- difference :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r
- intersection :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r
- keys :: UnionIntMap r -> [Key]
- rebuild :: Include r s => UnionIntMap r -> UnionIntMap s
- mapU :: (Union r -> Union s) -> UnionIntMap r -> UnionIntMap s
- mapWithKeyU :: (Key -> Union r -> Union s) -> UnionIntMap r -> UnionIntMap s
- mapU' :: (Union r -> a) -> UnionIntMap r -> IntMap a
- mapWithKeyU' :: (Key -> Union r -> a) -> UnionIntMap r -> IntMap a
- filterU :: (Union r -> Bool) -> UnionIntMap r -> UnionIntMap r
- filterWithKeyU :: (Key -> Union r -> Bool) -> UnionIntMap r -> UnionIntMap r
- foldrU :: (Union r -> b -> b) -> b -> UnionIntMap r -> b
- foldrWithKeyU :: (Key -> Union r -> b -> b) -> b -> UnionIntMap r -> b
- foldlU' :: (a -> Union r -> a) -> a -> UnionIntMap r -> a
- foldlWithKeyU' :: (a -> Key -> Union r -> a) -> a -> UnionIntMap r -> a
- showTree :: Show (Union r) => UnionIntMap r -> String

# Map type

data UnionIntMap r Source

All Show r => Show (UnionIntMap r) | |

Monoid (UnionIntMap r) |

# Operators

(\\) :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r Source

(!) :: Member a as => UnionIntMap as -> Key -> a Source

# Construction

empty :: UnionIntMap r Source

singleton :: Member a as => Key -> a -> UnionIntMap as Source

# Query

null :: UnionIntMap r -> Bool Source

size :: UnionIntMap r -> Int Source

member :: Key -> UnionIntMap r -> Bool Source

notMember :: Key -> UnionIntMap r -> Bool Source

lookup :: Member a as => Key -> UnionIntMap as -> Maybe a Source

lookupU :: Key -> UnionIntMap r -> Maybe (Union r) Source

find :: Member a as => Key -> UnionIntMap as -> a Source

findU :: Key -> UnionIntMap r -> Union r Source

findWithDefault :: Member a as => a -> Key -> UnionIntMap as -> a Source

## Insertion

insert :: Member a as => Key -> a -> UnionIntMap as -> UnionIntMap as Source

insertWith :: Member a as => (a -> a -> a) -> Key -> a -> UnionIntMap as -> UnionIntMap as Source

insertWithKey :: Member a as => (Key -> a -> a -> a) -> Key -> a -> UnionIntMap as -> UnionIntMap as Source

## Delete/Update

delete :: Key -> UnionIntMap as -> UnionIntMap as Source

adjust :: Member a as => (a -> a) -> Key -> UnionIntMap as -> UnionIntMap as Source

adjustWithKey :: Member a as => (Key -> a -> a) -> Key -> UnionIntMap as -> UnionIntMap as Source

update :: Member a as => (a -> Maybe a) -> Key -> UnionIntMap as -> UnionIntMap as Source

updateWithKey :: Member a as => (Key -> a -> Maybe a) -> Key -> UnionIntMap as -> UnionIntMap as Source

# Set Operation

union :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r Source

unions :: [UnionIntMap r] -> UnionIntMap r Source

difference :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r Source

intersection :: UnionIntMap r -> UnionIntMap r -> UnionIntMap r Source

# Conversion

keys :: UnionIntMap r -> [Key] Source

rebuild :: Include r s => UnionIntMap r -> UnionIntMap s Source

# Map

mapU :: (Union r -> Union s) -> UnionIntMap r -> UnionIntMap s Source

mapWithKeyU :: (Key -> Union r -> Union s) -> UnionIntMap r -> UnionIntMap s Source

mapU' :: (Union r -> a) -> UnionIntMap r -> IntMap a Source

mapWithKeyU' :: (Key -> Union r -> a) -> UnionIntMap r -> IntMap a Source

# Filter

filterU :: (Union r -> Bool) -> UnionIntMap r -> UnionIntMap r Source

filterWithKeyU :: (Key -> Union r -> Bool) -> UnionIntMap r -> UnionIntMap r Source

# Folds

foldrU :: (Union r -> b -> b) -> b -> UnionIntMap r -> b Source

foldrWithKeyU :: (Key -> Union r -> b -> b) -> b -> UnionIntMap r -> b Source

foldlU' :: (a -> Union r -> a) -> a -> UnionIntMap r -> a Source

foldlWithKeyU' :: (a -> Key -> Union r -> a) -> a -> UnionIntMap r -> a Source