File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -949,14 +949,11 @@ unsafeInsert k0 v0 m0 = runST (go h0 k0 v0 0 m0)
949949 | otherwise = go h k x s $ BitmapIndexed (mask hy s) (A. singleton t)
950950{-# INLINABLE unsafeInsert #-}
951951
952- -- | Create a map from two key-value pairs which hashes don't collide. To
953- -- enhance sharing, the second key-value pair is represented by the hash of its
954- -- key and a singleton HashMap pairing its key with its value.
955- --
956- -- Note: to avoid silly thunks, this function must be strict in the
957- -- key. See issue #232. We don't need to force the HashMap argument
958- -- because it's already in WHNF (having just been matched) and we
959- -- just put it directly in an array.
952+ -- | Create a map from a key-value pair and a 'Leaf' or 'Collision' node with
953+ -- a different hash.
954+ --
955+ -- It is the caller's responsibility to ensure that the 'HashMap' argument is
956+ -- in WHNF.
960957two :: Shift -> Hash -> k -> v -> Hash -> HashMap k v -> ST s (HashMap k v )
961958two = go
962959 where
You can’t perform that action at this time.
0 commit comments