Accept next-docstrings on GADT constructors.
ClosedPublic

Authored by bgamari on Jul 20 2015, 6:16 PM.

Details

Summary

Accept next docstrings (-- | Docstring) on GADT constructors.

I have confirmed that this adds no shift/reduce conflicts.

Test Plan

haddockA034

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bgamari updated this revision to Diff 3608.Jul 20 2015, 6:16 PM
bgamari retitled this revision from to Fix primops documentation syntax.
bgamari updated this object.
bgamari edited the test plan for this revision. (Show Details)
bgamari added reviewers: austin, simonpj.
bgamari added a subscriber: edsko.
bgamari updated this revision to Diff 3609.Jul 20 2015, 6:18 PM
  • Parser: Accept docstrings on GADT constructors
  • Don't accept prev docs
  • Fix shift-reduce conflicts
  • HsDecls: Print doc comments for GADT constructors
  • Add testcase
bgamari retitled this revision from Fix primops documentation syntax to Accept next-docstrings on GADT constructors..Jul 21 2015, 2:29 AM
bgamari updated this revision to Diff 3618.Jul 21 2015, 5:22 AM
  • Parser: Accept docstrings on GADT constructors
  • Don't accept prev docs
  • Fix shift-reduce conflicts
  • HsDecls: Print doc comments for GADT constructors
  • Add testcase
  • users_guide: Document Haddocks comments on GADT constructors
  • Fix long line
bgamari updated this object.Jul 21 2015, 5:24 AM
simonmar accepted this revision.Jul 21 2015, 9:24 AM
simonmar added a reviewer: simonmar.
simonmar added a subscriber: simonmar.

LGTM

This revision is now accepted and ready to land.Jul 21 2015, 9:24 AM

@Fuuzetsu do you think anything else should be needed here?

This revision was automatically updated to reflect the committed changes.
shlevy added a subscriber: shlevy.Jan 2 2017, 11:37 AM

What needs to be done to allow documentation of specific arguments of a particular constructor?

In D1086#84618, @shlevy wrote:

What needs to be done to allow documentation of specific arguments of a particular constructor?

Do you mean allowing haddock comments on non-record fields (e.g. Trac #12050)?

shlevy added a comment.Jan 2 2017, 8:14 PM

Ah, yes, I do, but I was thinking of it as function arguments due to the syntax. I'll follow that one.