<div dir="ltr">It seems that we really want is something like Idris's `:doc` command:<div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><font face="monospace, monospace">Idris> :doc map<br></font><font face="monospace, monospace">Prelude.Functor.map : Functor f => (m : a -> b) -> f a -> f b<br></font><font face="monospace, monospace">    Apply a function across everything of type 'a' in a<br></font><font face="monospace, monospace">    parameterised type<br></font><font face="monospace, monospace">    <br></font><font face="monospace, monospace">    The function is Total</font></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br><font face="monospace, monospace">Idris> :doc length<br></font><font face="monospace, monospace">Prelude.List.length : List a -> Nat<br></font><font face="monospace, monospace">    Compute the length of a list.<br></font><font face="monospace, monospace">    <br></font><font face="monospace, monospace">    Runs in linear time<br></font><font face="monospace, monospace">    <br></font><font face="monospace, monospace">    The function is Total<br></font><font face="monospace, monospace">Prelude.Strings.length : String -> Nat<br></font><font face="monospace, monospace">    Returns the length of the string.<br></font><font face="monospace, monospace">    <br></font><font face="monospace, monospace">        > length ""<br></font><font face="monospace, monospace">        0<br></font><font face="monospace, monospace">    <br></font><font face="monospace, monospace">        > length "ABC"<br></font><font face="monospace, monospace">        3<br></font><font face="monospace, monospace">    <br></font><font face="monospace, monospace">    The function is Total</font></blockquote><div><br></div></div></div><div>I don't like the idea of making `:type` more complicated, and I think this would satisfy the need for understanding much more effectively.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Matt Parsons</div></div></div></div>
<br><div class="gmail_quote">On Thu, Apr 28, 2016 at 3:35 PM, Daniel Díaz <span dir="ltr"><<a href="mailto:diaz.carrete@gmail.com" target="_blank">diaz.carrete@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I like the flag idea mentioned by Eric Seidel:<div><br></div><div>> <span style="color:rgb(0,0,0);white-space:pre-wrap">Perhaps instead of changing the default behavior of :type or adding new</span><pre style="white-space:pre-wrap;color:rgb(0,0,0)">commands, we could add a flag to enhance :type's output.</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Would it be overkill to have two flags, one that enabled showing the full type + specializations, and a "newbie mode" flag that only showed a few specializations?</pre><span class="HOEnZb"><font color="#888888"><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Daniel.</pre></font></span><span class=""><br>On Wednesday, April 27, 2016 at 2:34:29 PM UTC+2, Takenobu Tani wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div>Dear cafe,</div><div><br></div><div>I'm forwarding mail from ghc-devs ML [1].</div><div><br></div><div>I think `:type` command is very important for beginners and middle users.</div><div>Please feedback your opinion to them ;)</div><div><br></div><div>[1]: <a href="https://mail.haskell.org/pipermail/ghc-devs/2016-April/011933.html" rel="nofollow" target="_blank">https://mail.haskell.org/pipermail/ghc-devs/2016-April/011933.html</a></div><div><br></div><div><br></div></span><span class=""><div>> 2016-04-26 22:08 GMT+09:00 Richard Eisenberg <<a rel="nofollow">e...@cis.upenn.edu</a>>:</div><div>> Hi devs,</div><div>> </div><div>> 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="nofollow" 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="nofollow" target="_blank">https://ghc.haskell.org/trac/ghc/wiki/Design/GHCi/Type</a></div><div>> </div><div>> 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.</div><div>> </div><div>> Thanks!</div><div>> Richard</div><div><br></div><div>Cheers,</div><div>Takenobu</div><div><br></div></span></div>
</blockquote></div></div><br>_______________________________________________<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>
<br></blockquote></div><br></div>