<div dir="auto"><div dir="ltr">Thanks for the input Steven! We did what you mentioned (adding a tip about Overloaded lists near the top) in the containers introduction and walkthrough at <a href="https://haskell-containers.readthedocs.io/en/latest/set.html#short-example" target="_blank">https://haskell-containers.<wbr>readthedocs.io/en/latest/set.<wbr>html#short-example</a>. It sounds like we should do the same thing in the Haddocks.</div><div dir="ltr"><br></div><div dir="ltr">I'm also in agreeance that the examples should be copy-pasteable into Haskell source files or the repl. I think what Michael suggested (moving the set/map/sequence construction to a line above and assigning it to a variable) is a good compromise; there's no special syntax added and the actual use of the function becomes less "noisy".</div><span>
</span><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 10, 2018, 7:24 AM Steven Leiva <<a href="mailto:leiva.steven@gmail.com" target="_blank">leiva.steven@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>I consider myself a Haskell beginner, and I think that the current situation (with the use of <b>fromList</b>) will be less confusing than the funny brackets. <br><br></div>Even if you could make it so that copy/past would turn funny brackets into fromList, it would still be surprising behavior. When the code does something unexpected, we are going to try to put in the funny brackets in the repl. (Maybe that's more for programming beginners versus Haskell beginners, but let's not discount them either).<br><br></div>I haven't read the docs, and I understand that your primary concern is the noise from <b>fromList</b>, but I think leaving things as is and adding some wording that says "Hey, if you want to avoid having <b>fromList</b> everywhere in your own code, you can add OverloadedList  extension" would be the most approachable. (Shouldn't be too much to ask a beginner to at least read the preamble of a module's docs). <br><br></div>Just my 2 cents.<br></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 10, 2018 at 5:50 AM, Johannes Waldmann <span dir="ltr"><<a href="mailto:johannes.waldmann@htwk-leipzig.de" target="_blank">johannes.waldmann@htwk-<wbr>leipzig.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span><br>
> It looks like you're saying that `M.size [(2,3)]` should not be 1 (but<br>
> I'm not sure).<br>
<br>
</span>Sorry for being terse.<br>
No, that was just a comment about syntax, not semantics.<br>
<br>
I was just stating that because of the IsList instance,<br>
we can write  [(2,3)]  instead of  M.fromList [(2,3)]<br>
<br>
This would give shorter text in the examples in the API doc -<br>
and has the immense benefit that it already works as-is,<br>
does not need any haddock changes, unicodes, JS, etc.<br>
<br>
But it would hide the type distinction (Map vs. List)<br>
so it might turn out to be unhelpful.<br>
<div class="m_-742352214435719131m_5968299080263701496m_-4506695367957640412HOEnZb"><div class="m_-742352214435719131m_5968299080263701496m_-4506695367957640412h5"><br>
- J<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br><br clear="all"><br></div><div class="gmail_extra">-- <br><div class="m_-742352214435719131m_5968299080263701496m_-4506695367957640412gmail_signature" data-smartmail="gmail_signature">Steven Leiva<br><a href="tel:(305)%20528-6038" value="+13055286038" target="_blank">305.528.6038</a><br><a href="mailto:leiva.steven@gmail.com" target="_blank">leiva.steven@gmail.com</a><br><a href="http://www.linkedin.com/in/stevenleiva" target="_blank">http://www.linkedin.com/in/<wbr>stevenleiva</a><br></div>
</div>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>