@@ -67,14 +67,14 @@ module Data.HashSet
67
67
, toList
68
68
, fromList
69
69
70
- -- * HashMaps
70
+ -- * HashMapWs
71
71
, toMap
72
72
, fromMap
73
73
) where
74
74
75
75
import Control.DeepSeq (NFData (.. ))
76
76
import Data.Data hiding (Typeable )
77
- import Data.HashMap.Base (HashMap , foldrWithKey , equalKeys )
77
+ import Data.HashMap.Base (HashMapW , foldrWithKey , equalKeys )
78
78
import Data.Hashable (Hashable (hashWithSalt ))
79
79
#if __GLASGOW_HASKELL__ >= 711
80
80
import Data.Semigroup (Semigroup (.. ), Monoid (.. ))
@@ -103,7 +103,7 @@ import qualified Data.Hashable.Lifted as H
103
103
104
104
-- | A set of values. A set cannot contain duplicate values.
105
105
newtype HashSet a = HashSet {
106
- asMap :: HashMap a ()
106
+ asMap :: HashMapW a ()
107
107
} deriving (Typeable )
108
108
109
109
#if __GLASGOW_HASKELL__ >= 708
@@ -202,12 +202,12 @@ singleton :: Hashable a => a -> HashSet a
202
202
singleton a = HashSet (H. singleton a () )
203
203
{-# INLINABLE singleton #-}
204
204
205
- -- | /O(1)/ Convert to the equivalent 'HashMap '.
206
- toMap :: HashSet a -> HashMap a ()
205
+ -- | /O(1)/ Convert to the equivalent 'HashMapW '.
206
+ toMap :: HashSet a -> HashMapW a ()
207
207
toMap = asMap
208
208
209
- -- | /O(1)/ Convert from the equivalent 'HashMap '.
210
- fromMap :: HashMap a () -> HashSet a
209
+ -- | /O(1)/ Convert from the equivalent 'HashMapW '.
210
+ fromMap :: HashMapW a () -> HashSet a
211
211
fromMap = HashSet
212
212
213
213
-- | /O(n+m)/ Construct a set containing all elements from both sets.
0 commit comments