
I've just been looking at the Data.Map function "fromListWith". According to the docs, it has the type: * fromListWith* :: Ord http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Ord.html#t%3... k => (a -> a -> a) -> [(k, a)] -> Map http://www.haskell.org/ghc/docs/latest/html/libraries/containers/Data-Map.ht... k a I'd have thought that a better type would be * fromListWith* :: Ord http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Ord.html#t%3... k => (a -> b -> b) -> [(k, a)] -> Map http://www.haskell.org/ghc/docs/latest/html/libraries/containers/Data-Map.ht... k b This wouldn't break any existing code, but would allow things like "fromListWith (:)" to do the Right Thing. Would this be a sensible change (along with the other "with" functions in the module). Paul.