We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1029038 commit 0d0697eCopy full SHA for 0d0697e
Data/HashSet/Internal.hs
@@ -447,7 +447,7 @@ toList t = Exts.build (\ c z -> foldrWithKey (const . c) z (asMap t))
447
448
-- | \(O(n \min(W, n))\) Construct a set from a list of elements.
449
fromList :: (Eq a, Hashable a) => [a] -> HashSet a
450
-fromList = HashSet . List.foldl' (\ m k -> H.insert k () m) H.empty
+fromList = HashSet . List.foldl' (\ m k -> H.unsafeInsert k () m) H.empty
451
{-# INLINE fromList #-}
452
453
instance (Eq a, Hashable a) => Exts.IsList (HashSet a) where
0 commit comments