Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Data/HashMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ instance Ord k => Ord1 (HashMap k) where

-- | The ordering is total and consistent with the `Eq` instance. However,
-- nothing else about the ordering is specified, and it may change from
-- version to version of either this package or of hashable.
-- version to version of either this package or of @hashable@.
instance (Ord k, Ord v) => Ord (HashMap k v) where
compare = cmp compare compare

Expand Down Expand Up @@ -2224,7 +2224,8 @@ elems = List.map snd . toList
-- ** Lists

-- | \(O(n)\) Return a list of this map's elements. The list is
-- produced lazily. The order of its elements is unspecified.
-- produced lazily. The order of its elements is unspecified, and it may
-- change from version to version of either this package or of @hashable@.
toList :: HashMap k v -> [(k, v)]
toList t = Exts.build (\ c z -> foldrWithKey (curry c) z t)
{-# INLINE toList #-}
Expand Down
3 changes: 2 additions & 1 deletion Data/HashSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ filter p = HashSet . H.filterWithKey q . asMap
{-# INLINE filter #-}

-- | \(O(n)\) Return a list of this set's elements. The list is
-- produced lazily.
-- produced lazily. The order of its elements is unspecified, and it may
-- change from version to version of either this package or of @hashable@.
toList :: HashSet a -> [a]
toList t = Exts.build (\ c z -> foldrWithKey (const . c) z (asMap t))
{-# INLINE toList #-}
Expand Down