<div dir="ltr"><div class="gmail_default" style="font-size:small">There are lots of examples in the lens package.  I can't think of a better model.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 4, 2017 at 1:36 PM, Sunjay Varma <span dir="ltr"><<a href="mailto:varma.sunjay@gmail.com" target="_blank">varma.sunjay@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="auto"><div><div dir="auto">Hi all,</div>Are there any modules with good code examples that I should use as a reference? I want to include both the code and output of the example as if the user was running ghci. Are there any guidelines for contributing documentation?<div dir="auto"><br></div><div dir="auto">Thanks!</div><span class="HOEnZb"><font color="#888888"><div dir="auto">Sunjay</div></font></span><div><div class="h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On Jan 4, 2017 9:20 AM, "Matthew Pickering" <<a href="mailto:matthewtpickering@gmail.com" target="_blank">matthewtpickering@gmail.com</a>> wrote:<br type="attribution"><blockquote class="m_-2948631899192094159quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think this will be welcomed, go for it!<br>
<br>
All patches should be submitted on Phabricator. There are some<br>
straightforward instructions on how to submit a patch on the wiki -<br>
<a href="https://ghc.haskell.org/trac/ghc/wiki/Phabricator" rel="noreferrer" target="_blank">https://ghc.haskell.org/trac/g<wbr>hc/wiki/Phabricator</a><br>
<br>
If you want to build the documentation then you can modify mk/<a href="http://build.mk" rel="noreferrer" target="_blank">build.mk</a><br>
and add the line HADDOCK_DOCS = YES (and probably enable the quick<br>
build flavour by uncommenting the line).<br>
<br>
Message back if you need help or #ghc on freenode.<br>
<br>
Matt<br>
<div class="m_-2948631899192094159elided-text"><br>
On Wed, Jan 4, 2017 at 2:14 PM, Sunjay Varma <<a href="mailto:varma.sunjay@gmail.com" target="_blank">varma.sunjay@gmail.com</a>> wrote:<br>
> Hi,<br>
> I'm considering contributing examples to the documentation. I wanted to<br>
> start with something like Data.List because it is one of the modules I end<br>
> up using the most. I think a few examples for each function would help users<br>
> understand them better. I find myself referring back to books like learn you<br>
> a haskell because I don't remember exactly what I'm supposed to do with a<br>
> function.<br>
><br>
> Doing one module seems like a good start and hopefully we can have some<br>
> other people begin to add their own examples too.<br>
><br>
> Is this a worthwhile contribution? I haven't contributed before and so I<br>
> think it's prudent to ask before I add something no one wants.<br>
><br>
> Are there any examples of modules with good code examples that I should use<br>
> as a reference? I want to include both the code and output of the example as<br>
> if the user was running ghci. Are there any guidelines for contributing<br>
> documentation?<br>
><br>
> When I say Data.List, I really mean Data.Foldable and Data.Traversable since<br>
> that is where the functions are actually implemented.<br>
><br>
> I noticed the GitHub repo said that Pull Requests were okay for easy to<br>
> review documentation changes. Can I open a pull request there or should I<br>
> follow another process?<br>
><br>
> Please let me know when you can. I don't have an exact timeline for when<br>
> this will be done, but hopefully I'll have something in the next few weeks.<br>
> I don't anticipate that it will take long once I sit down to do it.<br>
><br>
> I've always complained about a lack of examples and never done anything<br>
> about it. Hopefully I can practice what I preach and contribute some in<br>
> order to make the documentation a little better for everyone.<br>
><br>
> Thanks for helping to make this language so great!<br>
> Sunjay<br>
><br>
><br>
</div>> ______________________________<wbr>_________________<br>
> ghc-devs mailing list<br>
> <a href="mailto:ghc-devs@haskell.org" target="_blank">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-bi<wbr>n/mailman/listinfo/ghc-devs</a><br>
><br>
</blockquote></div><br></div></div></div></div></div>
<br>______________________________<wbr>_________________<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-<wbr>bin/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>