
Andrew Coppin
[...] I completely agree that Hashtable should instance Map and alike.
Data.List.map :: (a -> b) -> [a] -> [b]
Other containers only support *one* type of data:
Data.ByteString.Char8.map :: (Char -> Char) -> ByteString -> ByteString
The type has a different kind, and the function parameter's type is more constrained. Yet still this poses no problem.
However... now try writing a class that both of these functions could be methods of. Good luck with that, by the way...
Well the type _could_ be map :: (a -> b) -> ByteString a -> ByteString b and have a hell a lot of plumbing that utterly destroys ByteString's optimisation. But then you'll be happy to know that there's already Data.Stream.List, with more coming at the same speed as we can order pizza for dons. http://hackage.haskell.org/trac/ghc/ticket/915 -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or broadcasting of this signature prohibited.