Drastic Prelude changes imminent

Augustsson, Lennart Lennart.Augustsson at sc.com
Tue Jan 27 16:10:34 UTC 2015


But having Data.List export a non-list version of foldr is a terrible idea.

-----Original Message-----
From: Erik Hesselink [mailto:hesselink at gmail.com] 
Sent: 27 January 2015 16:07
To: Johan Tibell
Cc: Augustsson, Lennart; libraries at haskell.org
Subject: Re: Drastic Prelude changes imminent

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 <johan.tibell at gmail.com> wrote:
> 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>

This email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please delete all copies and notify the sender immediately. You may wish to refer to the incorporation details of Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at 
http://www.standardchartered.com/en/incorporation-details.html

Insofar as this communication contains any market commentary, the market commentary has been prepared by a sales and/or trading desk of Standard Chartered Bank or its affiliate. It is not and does not constitute research material, independent research, recommendation or financial advice. Any market commentary is for information purpose only and shall not be relied for any other purpose, and is subject to the relevant disclaimers available at http://wholesalebanking.standardchartered.com/en/utility/Pages/d-mkt.aspx.

Please visit http://wholesalebanking.standardchartered.com/en/capabilities/financialmarkets/Pages/doddfrankdisclosures.aspx  for important information with respect to derivative products.


More information about the Libraries mailing list