
That doesn't really sound feasible, as there would be name clashes
when importing both the Prelude (with generalized functions) and
Data.List (with monomorphic functions). The only way to get
generalized functions and minimize breakage is to also generalize
Data.List.
Erik
On Tue, Jan 27, 2015 at 5:03 PM, 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
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries