Copyright | (C) 2015, Yu Fukuzawa |
---|---|

License | BSD3 |

Maintainer | minpou.primer@email.com |

Stability | experimental |

Portability | portable |

Safe Haskell | None |

Language | Haskell2010 |

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

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

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

# Types

# Operators

# Construction

# Query

findWithDefault :: (Ord k, Member as a) => a -> k -> UnionMap k as -> a Source

## Insertion

insertWith :: (Ord k, Member as a) => (a -> a -> a) -> k -> a -> UnionMap k as -> UnionMap k as Source

insertWithKey :: (Ord k, Member as a) => (k -> a -> a -> a) -> k -> a -> UnionMap k as -> UnionMap k as Source

## Delete/Update

adjustWithKey :: (Ord k, Member as a) => (k -> a -> a) -> k -> UnionMap k as -> UnionMap k as Source

updateWithKey :: (Ord k, Member as a) => (k -> a -> Maybe a) -> k -> UnionMap k as -> UnionMap k as Source

# Set Operation

# Conversion

# Map

# Filter

# Folds

foldrWithKeyU :: (k -> (K0 :| r) -> b -> b) -> b -> UnionMap k r -> b Source

foldlWithKeyU' :: (a -> k -> (K0 :| r) -> a) -> a -> UnionMap k r -> a Source