Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Map k v
- type Key a = (Eq a, Hashable a)
- new :: STM (Map k v)
- newIO :: IO (Map k v)
- insert :: Key k => v -> k -> Map k v -> STM ()
- delete :: Key k => k -> Map k v -> STM ()
- deleteAll :: Map k v -> STM ()
- lookup :: Key k => k -> Map k v -> STM (Maybe v)
- focus :: Key k => StrategyM STM v r -> k -> Map k v -> STM r
- null :: Map k v -> STM Bool
- size :: Map k v -> STM Int
- stream :: Map k v -> ListT STM (k, v)
Documentation
newIO :: IO (Map k v) Source #
Construct a new map in IO.
This is useful for creating it on a top-level using unsafePerformIO
,
because using atomically
inside unsafePerformIO
isn't possible.