| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Support Haddocks on constructor arguments
This is in conjunction with https://phabricator.haskell.org/D4094.
Adds support for rendering Haddock's on (non-record) constructor
arguments, both for regular and GADT constructors.
* Support haddocks on pattern synonym arguments
It appears that GHC already parsed these - we just weren't using them.
In the process of doing this, I tried to deduplicate some code around
handling patterns.
* Update the markup guide
Add some information about the new support for commenting constructor
arguments, and mention pattern synonyms and GADT-style constructors.
* Overhaul LaTeX support for data/pattern decls
This includes at least
* fixing several bugs that resulted in invalid LaTeX
* fixing GADT data declaration headers
* overhaul handling of record fields
* overhaul handling of GADT constructors
* overhaul handling of bundled patterns
* add support for constructor argument docs
* Support GADT record constructors
This means changes what existing HTML docs look like.
As for LaTeX, looks like GADT records were never even supported. Now they are.
* Clean up code/comments
Made code/comments consistent between the LaTeX and XHTML backend
when possible.
* Update changelog
* Patch post-rebase regressions
* Another post-rebase change
We want return values to be documentable on record GADT constructors.
|
| |
| |
| |
| | |
This tracks the refactoring of HsDecl.ConDecl.
|
| | |
|
| |
| |
| | |
Fixes parts 1 and 2 of #806.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Metadoc stores a package name
This means that '@since' annotations can be package aware.
* Get the package name the right way
This should extract the package name for `@since` annotations the
right way. I had to move `modulePackageInfo` around to do this and,
in the process, I took the liberty to update it.
Since it appears that finding the package name is something that can
fail, I added a warning for this case.
* Silence warnings
* Hide package for local 'since' annotations
As discussed, this is still the usual case (and we should avoid being
noisy for it).
Although this commit is large, it is basically only about threading a
'Maybe Package' from 'Haddock.render' all the way to
'Haddock.Backends.Xhtml.DocMarkup.renderMeta'.
* Bump binary interface version
* Add a '--since-qual' option
This controls when to qualify since annotations with the package they
come from. The default is always, but I've left an 'external' variant
where only those annotations coming from outside of the current
package are qualified.
* Make ParserSpec work
* Make Fixtures work
* Use package name even if package version is not available
The @since stuff needs only the package name passed in, so it
makes sense to not be forced to pass in a version too.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add some useful cost-centres for profiling
* Add withTiming for each haddock phase
Invoking haddock with `--optghc=-ddump-timings` now shows the amount
of time spent and the number of allocated bytes for each phase.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Indicate source module of instances
Above instance, we now also display a link to the module where the
instance was defined. This is sometimes helpful in figuring out
what to import.
* Source module for type/data families too
* Remove parens
* Accept tests
|
| |
| |
| |
| |
| |
| | |
* extractDecl: Allow extraction of data family instance constructors
* extractDecl: extract data family instance constructors
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Brought back some mistakenly deleted code for handling encoding and eager
reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add 'show' option to complement 'hide'
The behaviour is for flags passed in the command line to override
flags in file headers. In the command line, later flags override
earlier ones.
Fixes #751 and #266.
* Add a '--show-all' option
|
| |
| |
| | |
No more clicking to figure out whether your bytestring is strict or lazy!
|
| |
| |
| |
| |
| |
| |
| |
| | |
In https://github.com/haskell/haddock/issues/287 we found that
haddock-2.19.0 would miss documentation on class methods with
multiples names.
This patch uses expandSigDecls in a more sensible place.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This handles 'HsSpliceTy's by replacing them with what they expand to.
IIUC everything that is happening, 'renameHsSpliceTy' should not be
able to fail for the inputs we feed it from GHC.
This fixes #574.
|
| |
| |
| |
| |
| |
| |
| | |
This manually filters out '~' from the list of things to warn about. It truly
makes no sense to warn on this since '~' has nothing it could link to - it is
magical.
This fixes #532.
|
| |
| |
| |
| |
| |
| | |
Links to pattern synonyms are now generated, as well as links from
modules in import lists.
Fixes #731.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
C.f. SPDX 2.1 - Appendix V
https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b
The tag should appear on its own line in the source file, generally as part of a comment.
SPDX-License-Identifier: <SPDX License Expression>
Cherry-picked from #743
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The hyperlinker backend now classifies the content of pragmas as
'TkPragma'. That means that in something like '{-# INLINE foo #-}',
'foo' still gets classified as a pragma token.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
This fixes #666.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix infinite loop when specializing instance heads
The bug can only be triggered from TH, hence why it went un-noticed for
so long.
* Add test for #679 and #710
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add table examples
* Add table types and adopt simple parser
Simple parser is done by Giovanni Cappellotto (@potomak)
in https://github.com/haskell/haddock/pull/577
It seems to support single fine full tables, so far from full
RST-grid tables, but it's good start.
Table type support row- and colspans, but obviously parser is lacking.
Still TODO:
- Latex backend. Should we use multirow package
https://ctan.org/pkg/multirow?lang=en?
- Hoogle backend: ?
* Implement grid-tables
* Refactor table parser
* Add two ill-examples
* Update CHANGES.md
* Basic documentation for tables
* Fix documentation example
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Patch flaky parser test
This test was a great idea, but it doesn't port over too well to using
the GHC lexer. GHC rewrites its input a bit - nothing surprising, but
we need to guard against those cases for the test.
* Change instance head
* Change use site
|
| |
| |
| |
| | |
module names.
|
| |
| |
| |
| | |
See #579. This just adds an <a> tag around the heading, pointing to the
heading itself.
|