@@ -67,14 +67,14 @@ module Data.HashSet
6767 , toList
6868 , fromList
6969
70- -- * HashMaps
70+ -- * HashMapWs
7171 , toMap
7272 , fromMap
7373 ) where
7474
7575import Control.DeepSeq (NFData (.. ))
7676import Data.Data hiding (Typeable )
77- import Data.HashMap.Base (HashMap , foldrWithKey , equalKeys )
77+ import Data.HashMap.Base (HashMapW , foldrWithKey , equalKeys )
7878import Data.Hashable (Hashable (hashWithSalt ))
7979#if __GLASGOW_HASKELL__ >= 711
8080import Data.Semigroup (Semigroup (.. ), Monoid (.. ))
@@ -103,7 +103,7 @@ import qualified Data.Hashable.Lifted as H
103103
104104-- | A set of values. A set cannot contain duplicate values.
105105newtype HashSet a = HashSet {
106- asMap :: HashMap a ()
106+ asMap :: HashMapW a ()
107107 } deriving (Typeable )
108108
109109#if __GLASGOW_HASKELL__ >= 708
@@ -202,12 +202,12 @@ singleton :: Hashable a => a -> HashSet a
202202singleton a = HashSet (H. singleton a () )
203203{-# INLINABLE singleton #-}
204204
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 ()
207207toMap = asMap
208208
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
211211fromMap = HashSet
212212
213213-- | /O(n+m)/ Construct a set containing all elements from both sets.
0 commit comments