<div dir="ltr"><div>Hi Richard,</div><div><br></div><div>I like your decision and plan.</div><div>Thank you a lot of work, for community.</div><div><br></div><div><br></div><div>About new command name for (1): </div><div><br></div><div>Most users, perhaps, have entered the `:t` rather than `:type`.</div><div><br></div><div> ghci> :t length</div><div><br></div><div>In the same way, how about a full name and abbreviation name for (1).</div><div>For example, we prepare `:type-default` and `:td`.</div><div><br></div><div> ghci> :td length</div><div><br></div><div>So they don't misunderstand that it is "typedef".</div><div><br></div><div><br></div><div>I also like `:type!` and `:types` with Jack :)</div><div><br></div><div> ghci> :t! length</div><div><br></div><div><br></div><div>Regards,</div><div>Takenobu</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-03 5:10 GMT+09:00 Richard Eisenberg <span dir="ltr"><<a href="mailto:eir@cis.upenn.edu" target="_blank">eir@cis.upenn.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have collected feedback gleaned here, on the ticket, and on reddit and summarized here: <a href="https://ghc.haskell.org/trac/ghc/wiki/Design/GHCi/Type#Summaryoffeedbackaboutthisissue" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Design/GHCi/Type#Summaryoffeedbackaboutthisissue</a><br>
<br>
That summary includes this concrete proposal:<br>
1. Ask for concrete suggestions about names for the new commands.<br>
2. Use these names on my current implementation (which prints out only one specialization)<br>
3. Post a feature request looking for more specializations.<br>
<br>
I simply don't have time to specify a design or implement an algorithm for printing out multiple specializations. Furthermore, my current implementation meets all specifications proffered for printing out multiple specializations, for all values of "multiple" that equal 1. It is easy to extend later.<br>
<br>
Separately, there is a groundswell of support for :doc, but that's beyond the scope of my work on this point. (I personally would love :doc, too.)<br>
<br>
So, what shall we name the two new commands?<br>
<br>
1. A new command that specializes a type. (Currently with one specialization, but perhaps more examples in the future.)<br>
<br>
2. A new command that preserves specialized type variables so that users of TypeApplications know what type parameters to pass in next.<br>
<br>
I have suggested :type-def for (1) and :type-spec for (2). I don't strongly like either. :examples and :inst have been suggested for (1). Any other ideas?<br>
<br>
Thanks!<br>
Richard<br>
<div><div class="h5"><br>
On Apr 26, 2016, at 9:08 AM, Richard Eisenberg <<a href="mailto:eir@cis.upenn.edu">eir@cis.upenn.edu</a>> wrote:<br>
<br>
> Hi devs,<br>
><br>
> Over the weekend, I was pondering the Haskell course I will be teaching next year and shuddered at having to teach Foldable at the same time as `length`. So I implemented feature request #10963 (<a href="https://ghc.haskell.org/trac/ghc/ticket/10963" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/ticket/10963</a>), which allows for a way for a user to request a specialization of a type. It all works wonderfully, but there is a real user-facing design issue here around the default behavior of :type and whether or not to add new :type-y like commands. I have outlined the situation here: <a href="https://ghc.haskell.org/trac/ghc/wiki/Design/GHCi/Type" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Design/GHCi/Type</a><br>
><br>
> I'd love some broad input on this issue. If you've got a stake in how this all works, please skim that wiki page and comment on #10963.<br>
><br>
> Thanks!<br>
> Richard<br>
> _______________________________________________<br>
> ghc-devs mailing list<br>
> <a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
<br>
</div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>