Re: [Haskell-cafe] Drastic Prelude changes imminent

On Tue, Jan 27, 2015 at 11:03 AM, Johan Tibell
Looking at the generalizations in Data.List I find them pretty odd now when I think about it. I'd expect Data.List functions to be monomorphic to lists, just like I expect functions in Data.Map to be monomorphic to maps. Now there might be generalized versions of these functions in e.g. the Prelude, but generalizing Data.List means that I don't even have the monomorphic versions available if I want to resolve ambiguity by using them*.
* It turns out resolving ambiguity is pretty annoying. The type signatures are awkward to write so I end having to write something akin to
mymap :: (a -> b) -> [a] -> [b] mymap = map
Unless you're using -XOverloadedLists, you can throw in a (`asTypeOf` []) to disambiguate. Or is that the annoyance you were talking about?
participants (1)
-
adam vogt