diff --git a/Data/HashMap/Internal.hs b/Data/HashMap/Internal.hs index 2bb7029c..cbcff246 100644 --- a/Data/HashMap/Internal.hs +++ b/Data/HashMap/Internal.hs @@ -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 @@ -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 #-} diff --git a/Data/HashSet/Internal.hs b/Data/HashSet/Internal.hs index be1af480..143aefb8 100644 --- a/Data/HashSet/Internal.hs +++ b/Data/HashSet/Internal.hs @@ -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 #-}