Re: Contributing Examples to the Documentation

2017-01-05 Thread Oleg Grenrus
See e.g. https://github.com/ghc/ghc/blob/baf9ebe55a51827c0511b3a670e60b9bb3617ab5/libraries/base/Data/Maybe.hs#L84-L101 for an example already in `base`. Relevant ticket: https://ghc.haskell.org/trac/ghc/ticket/11551 - Oleg On 05.01.2017 03:51, Kazu Yamamoto (山本和彦) wrote: > Hi Sunjay, > >> If

Re: Contributing Examples to the Documentation

2017-01-05 Thread Oleg Grenrus
On 05.01.2017 00:01, Ben Gamari wrote: > Sunjay Varma <varma.sun...@gmail.com> writes: > >> Hi, >> I'm considering contributing examples to the documentation. I wanted to >> start with something like Data.List because it is one of the modules I end >> up us

Re: Contributing Examples to the Documentation

2017-01-04 Thread 山本和彦
Hi Sunjay, > If I use the doctest style, do I use ">>>" for the prompt? That's more a > Python thing. Maybe ">" would be more appropriate for Haskell? You should use ">>>". If you don't know doctest for Haskell, please read: https://github.com/sol/doctest#readme The following document

Re: Contributing Examples to the Documentation

2017-01-04 Thread David Fox
y mk/build.mk > and add the line HADDOCK_DOCS = YES (and probably enable the quick > build flavour by uncommenting the line). > > Message back if you need help or #ghc on freenode. > > Matt > > On Wed, Jan 4, 2017 at 2:14 PM, Sunjay Varma <varma.sun...@gmail.com> >

Re: Contributing Examples to the Documentation

2017-01-04 Thread Sunjay Varma
Hi Kazu, If I use the doctest style, do I use ">>>" for the prompt? That's more a Python thing. Maybe ">" would be more appropriate for Haskell? Sunjay On Jan 4, 2017 5:39 PM, "Kazu Yamamoto" wrote: Hi Sunjay, > Are there any modules with good code examples that I should use

Re: Contributing Examples to the Documentation

2017-01-04 Thread 山本和彦
Hi Sunjay, > 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? I would suggest to use the doctest style so that

Re: Contributing Examples to the Documentation

2017-01-04 Thread Ben Gamari
Sunjay Varma <varma.sun...@gmail.com> writes: > Hi, > I'm considering contributing examples to the documentation. I wanted to > start with something like Data.List because it is one of the modules I end > up using the most. I think a few examples for each function would help

Re: Contributing Examples to the Documentation

2017-01-04 Thread Sunjay Varma
gt; wrote: > Hi, > I'm considering contributing examples to the documentation. I wanted to > start with something like Data.List because it is one of the modules I end > up using the most. I think a few examples for each function would help users > understand them better. I find myself r

Re: Contributing Examples to the Documentation

2017-01-04 Thread Matthew Pickering
and add the line HADDOCK_DOCS = YES (and probably enable the quick build flavour by uncommenting the line). Message back if you need help or #ghc on freenode. Matt On Wed, Jan 4, 2017 at 2:14 PM, Sunjay Varma <varma.sun...@gmail.com> wrote: > Hi, > I'm considering contribut

Contributing Examples to the Documentation

2017-01-04 Thread Sunjay Varma
Hi, I'm considering contributing examples to the documentation. I wanted to start with something like Data.List because it is one of the modules I end up using the most. I think a few examples for each function would help users understand them better. I find myself referring back to books like