Proposal: Add singleton function to Data.List module

Theodore Lief Gannon tanuki at gmail.com
Mon Aug 12 22:36:10 UTC 2019


On Mon, Aug 12, 2019, 12:53 PM Andrew Lelechenko <
andrew.lelechenko at gmail.com> wrote:

> Adding singleton to Data.List is a breaking change, when
> Data.Map.singleton was exported unqualified.
>

Data.Map's documentation states that the entire module should be imported
qualified; this is not a reasonable counterargument.

RIO even takes the potentially-conflicting List functions out of Prelude,
and puts them in a RIO.List module which is also intended for qualified
import.

I'm +1. Personally I prefer `pure` and have TypeApplication enabled
globally; but that's not a universal style, and I see no real cost here
(though I agree it shouldn't be exposed in Prelude).

NonEmpty should get one too.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190812/948d3fda/attachment.html>


More information about the Libraries mailing list