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
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
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
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>
>
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
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
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
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
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
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
10 matches
Mail list logo