1{-# LANGUAGE Safe #-}
2
3------------------------------------------------------------------------
4-- |
5-- Module      :  Data.HashMap.Strict
6-- Copyright   :  2010-2012 Johan Tibell
7-- License     :  BSD-style
8-- Maintainer  :  johan.tibell@gmail.com
9-- Stability   :  provisional
10-- Portability :  portable
11--
12-- A map from /hashable/ keys to values.  A map cannot contain
13-- duplicate keys; each key can map to at most one value.  A 'HashMap'
14-- makes no guarantees as to the order of its elements.
15--
16-- The implementation is based on /hash array mapped tries/.  A
17-- 'HashMap' is often faster than other tree-based set types,
18-- especially when key comparison is expensive, as in the case of
19-- strings.
20--
21-- Many operations have a average-case complexity of /O(log n)/.  The
22-- implementation uses a large base (i.e. 16) so in practice these
23-- operations are constant time.
24module Data.HashMap.Strict
25    (
26      -- * Strictness properties
27      -- $strictness
28
29      HashMap
30
31      -- * Construction
32    , empty
33    , singleton
34
35      -- * Basic interface
36    , null
37    , size
38    , member
39    , lookup
40    , lookupDefault
41    , (!)
42    , insert
43    , insertWith
44    , delete
45    , adjust
46    , update
47    , alter
48    , alterF
49
50      -- * Combine
51      -- ** Union
52    , union
53    , unionWith
54    , unionWithKey
55    , unions
56
57      -- * Transformations
58    , map
59    , mapWithKey
60    , traverseWithKey
61
62      -- * Difference and intersection
63    , difference
64    , differenceWith
65    , intersection
66    , intersectionWith
67    , intersectionWithKey
68
69      -- * Folds
70    , foldl'
71    , foldlWithKey'
72    , foldr
73    , foldrWithKey
74
75      -- * Filter
76    , filter
77    , filterWithKey
78    , mapMaybe
79    , mapMaybeWithKey
80
81      -- * Conversions
82    , keys
83    , elems
84
85      -- ** Lists
86    , toList
87    , fromList
88    , fromListWith
89
90      -- ** HashSets
91    , HS.keysSet
92    ) where
93
94import Data.HashMap.Strict.Base as HM
95import qualified Data.HashSet.Base as HS
96import Prelude ()
97