@@ -165,9 +165,9 @@ keys = M.keys . unpack
165{-# INLINE keys #-}
165{-# INLINE keys #-}
167-- | /O(n*log n)/. Construct a map with the supplied mappings. If the list
167-- | /O(n*log n)/. Construct a map with the supplied mappings. If the list
168−-- contains duplicate mappings, the later mappings take precedence.
168+-- contains duplicate mappings, values will be merged using (mappend newVal oldVal).
169−fromList :: (Eq k, Hashable k) => [(k,a)] -> MonoidalHashMap k a
169+fromList :: (Eq k, Hashable k, Monoid a) => [(k,a)] -> MonoidalHashMap k a
170−fromList = pack . M.fromList
170+fromList = pack . M.fromListWith mappend
171{-# INLINE fromList #-}
171{-# INLINE fromList #-}
173-- | /O(n*log n)/. Construct a map with the supplied mappings. If the list
173-- | /O(n*log n)/. Construct a map with the supplied mappings. If the list