<div dir="ltr"><a href="https://groups.google.com/forum/#!forum/haskell-core-libraries">https://groups.google.com/forum/#!forum/haskell-core-libraries</a> should link to the CLC mailing list archive. As far as I can tell it should be public.<br><div><br></div><div>-Edward<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 7, 2019 at 11:53 PM Helmut Schmidt <<a href="mailto:helmut.schmidt.4711@gmail.com">helmut.schmidt.4711@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div>Am So., 8. Sept. 2019 um 05:59 Uhr schrieb Edward Kmett <<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>>:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">To grant some insight into what is going on behind closed doors. I figured I'd unpack a bit of it here.</div></blockquote><div><br></div><div><div>Why is it necessary this gets discussed behind closed doors in the first place? Why can't we get more insight into the decision process of such a highly controversial proposal?<br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>The current resolution is to treat this as step one in a longer maneuver.</div><div><br></div><div><i>We'll be adding </i><font face="monospace">singleton</font><i> to </i><font face="monospace">Data.List</font><i>, immediately.</i></div><div><br></div><div>The headache has really been the issue mentioned above wherein <font face="monospace">Data.List</font> has historically been treated as an unqualified export that shouldn't clash with the <font face="monospace">Prelude</font> in any way. </div><div><br></div><div>This is mostly a historical accident and doesn't really match up with the way any of the other "container" like modules are expected to be used. It has led to the somewhat messy state of dozens of other combinators in <font face="monospace">Data.List </font><font face="arial, sans-serif">such as </font><font face="monospace">foldr</font> having to be generalized by the <font face="monospace">Foldable</font>/<font face="monospace">Traversable</font> Proposal and other language warts starting to accumulate over time. It is disproportionately difficult to add things to <font face="monospace">Data.List,</font> so we're going to fix that. -- We'd intended to fix that wart since GHC 7.10, but lacked a sufficient forcing function. Expanding the API of <font face="monospace">Data.List</font> is acting as that forcing function.</div><div><br></div><div><i>We are going to be switching the usage pattern for </i><font face="monospace">Data.List</font><i> to expect a qualified or explicit import list like </i><font face="monospace">Data.Text</font>, <font face="monospace">Data.ByteString</font>, <font face="monospace">Data.Set</font>,<i> etc.</i></div><div><br><div>This also helps allow for easier expansion of <font face="monospace">Data.List</font>, which has been pretty stagnant other than a non-report-specified <font face="monospace">uncons</font> slipping in stealthily in GHC 7.10.</div><div></div><br></div><div><div>It also helps ameliorate any long term concerns with this taking a name, as it is now something placed in a module where name collisions are okay, as usage is qualified or explicit. Meanwhile, Ryan GL Scott managed to accumulate enough data to show that breakage this one combinator would introduce was pretty minor after all, so we're going to go ahead with adding <font face="monospace">singleton</font> before the rest of this happens.</div><div><div><div></div></div><div></div></div><div><br></div></div><div>To get <i>there</i>, we'll need a slightly longer timeline, and some support from GHC HQ to craft an appropriate warning. This will allow us to monomorphize the combinators in <font face="monospace">Data.List</font> yielding a sane ending state that doesn't require a PhD in the History of Haskell to fully understand, and we'll be able to retire <font face="monospace">GHC.OldList</font> once an appropriate 3-release policy compatible migration plan has been fully hammered out.</div><div><br></div><div>Normally, I'd wait until we had a full plan with all the migration issues posted rather than shooting off half-cocked like this, but I wanted to be clear about what was causing the communication delay.</div><div><br></div><div>-Edward</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 12:57 PM Keith <<a href="mailto:keith.wygant@gmail.com" target="_blank">keith.wygant@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>For what it's worth, when starting out I found the disconnect between list sugar and list constructor/destructors extremely confusing.<br> In retrospect it seems pretty silly, but I could not figure out how lists were consumed as (x : xs) but often produced with [x, x1, ...]. Mistakes like [x, xs] were common.<br> When I finally realized that I could construct lists with the list constuctors, I started using them exclusively.<br><br>Simplcity and straightforwardness help understanding. It was much easier for me to understand a singleton list as (x : []) than [x]. Having to deal with '(singleton x)' (at the time not knowing the definition of 'singleton') would have been another layer of confusion.<br><br>I get that 'singleton' is library design, since in shows up in Map, Array, Set, etc. But for me trying to use lists, it would have only been useful if I defined it myself as a way to learn that constuctors are fuctions, and that 'singleton' means 'single'.<br><br><div class="gmail_quote">On August 23, 2019 7:56:41 AM UTC, Sven Panne <<a href="mailto:svenpanne@gmail.com" target="_blank">svenpanne@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div dir="ltr">Am Do., 22. Aug. 2019 um 19:11 Uhr schrieb Kris Nuttycombe <<a href="mailto:kris.nuttycombe@gmail.com" target="_blank">kris.nuttycombe@gmail.com</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 22, 2019 at 3:58 AM Sven Panne <<a href="mailto:svenpanne@gmail.com" target="_blank">svenpanne@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr"> I think there's a significant difference between "little helper" and "the monomorphic function that is used to implement `pure`" - with a slightly different framing, we might be able to come to an agreement that both the monomorphic an polymorphic versions of this function are useful in different contexts. [...]<br></div></div></div></blockquote></div></div></blockquote><div><br></div><div>I think we can agree that we disagree here. ;-) My brain is too small to remember the names of myriads of trivial helpers, so I very much prefer general, orthogonal things. In our case: If we have a general, polymorphic function (often from a type class), just use that. If for some reason (rarely!) I want a more monomorphic function, I can just add a plain old type signature somewhere (no need for funky language extensions like type applications). This radically reduces the number of things one has to remember. In our case: Know type classes + know a way to make things more monomorphic.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr"></div></div></div></blockquote><div>My guiding principle for API design is that one should always expose the fundamental building blocks as a low-level API, and then provide a smaller interface for the common use cases. Typeclass instances are no different - they are the general interface that allows us to invoke what is ultimately a monomorphic, low-level building block function in a polymorphic context. </div></div></div></blockquote><div><br></div><div>This is exactly the opposite API design principle I have: Do not expose the monomorphic functions if they are already in a type class. You can easily reconstruct them as a library user via type signtures if this is really needed (still haven't seen many convincing examples of that), but you can' do it the other way round. Less things exposed, no generality/use cases lost => easier to remember.</div><div><br></div><div>The thing we can probably agree on: API design is hard and it's not an exact science, more a kind of art which is assessed in a subjective way... :-)</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>
</blockquote></div><br>Keith<br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</div>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div></div>
</blockquote></div>