aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends
Commit message (Collapse)AuthorAgeFilesLines
* Remove 'TokenGroup' from Hyperlinker (#818)Alec Theriault2018-05-081-50/+14
| | | | | Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo').
* Filter out CRLFs in hyperlinker backend (#813)Alec Theriault2018-05-071-2/+7
| | | This prevents spurious lines from appearing in the final output.
* Improve the Hoogle backend's treatment of type families (#808)Ryan Scott2018-04-241-6/+20
| | | Fixes parts 1 and 2 of #806.
* Don't treat fixity signatures like declarationsalexbiehl2018-04-201-1/+1
|
* @since includes package name (#749)Alec Theriault2018-03-274-172/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Show where instances are defined (#748)Alec Theriault2018-03-213-15/+19
| | | | | | | | | | | | | | * 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
* Hyperlinker: Links for TyOps, class methods and associated typesalexbiehl2018-03-051-1/+14
|
* Hoogle/Latex: Remove use of partial functionAlexander Biehl2018-02-192-7/+5
|
* Teach the HTML backend how to render methods with multiple namesalexbiehl2018-02-191-6/+6
|
* Add module tooltips to linked identifiers (#753)Alec Theriault2018-02-111-3/+5
| | | No more clicking to figure out whether your bytestring is strict or lazy!
* Hyperlinker: Also link pattern synonym argumentsalexbiehl2018-02-061-2/+5
|
* Hyperlink pattern synonyms and 'module' imports (#744)Alec Theriault2018-02-051-4/+10
| | | | | | Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes #731.
* Use withBinaryFilealexbiehl2018-02-041-1/+1
|
* QuickJump: Mitigate encoding problems on Windowsalexbiehl2018-02-031-4/+5
|
* Support the new 'ITcolumn_prag' tokenAlec Theriault2018-02-021-0/+2
|
* Properly color pragma contents in hyperlinkerAlec Theriault2018-02-021-13/+65
| | | | | | 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.
* Warning free compilationAlexander Biehl2018-02-011-1/+0
|
* Hyperlinker: Adjust parser to new PFailed constructorAlexander Biehl2018-02-011-8/+8
|
* Grid Tables (#718)Oleg Grenrus2018-02-013-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Clickable anchors for headings (#716)Alec Theriault2018-02-011-1/+2
| | | | See #579. This just adds an <a> tag around the heading, pointing to the heading itself.
* Use the GHC lexer for the Hyperlinker backend (#714)Alec Theriault2018-02-014-238/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog
* Revert "Match changes for Trees that Grow in GHC"Ben Gamari2017-11-214-86/+85
| | | | This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547.
* Revert "Match Trees that Grow in GHC for HsExpr"Ben Gamari2017-11-211-2/+2
| | | | This reverts commit 9f054dc365379c66668de6719840918190ae6e44.
* Revert "Clean up use of PlaceHolder, to match TTG"Ben Gamari2017-11-213-6/+6
| | | | This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049.
* Clean up use of PlaceHolder, to match TTGAlan Zimmerman2017-11-143-6/+6
|
* Match Trees that Grow in GHC for HsExprAlan Zimmerman2017-11-111-2/+2
|
* Match changes for Trees that Grow in GHCAlan Zimmerman2017-11-074-85/+86
|
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-10-316-77/+88
|\
| * Remote tabalexbiehl2017-10-311-2/+1
| |
| * Copy quickjump.css for nicer error messagesalexbiehl2017-10-311-3/+3
| |
| * Supported reexported-modules via --reexport flag.Edward Z. Yang2017-10-311-14/+11
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Put Quickjump behind --quickjump flag (#697)Alexander Biehl2017-10-302-15/+18
| |
| * Add QuickJump version to meta.json (#696)Alexander Biehl2017-10-301-2/+8
| |
| * Use <details> element for collapsibles (#690)Tim Baumann2017-10-094-35/+41
| | | | | | | | | | | | | | | | | | | | | | * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes #560.
* | Overhaul Haddock's rendering of kind signatures (#681)Ryan Scott2017-10-242-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC
* | Fix merge falloutalexbiehl2017-10-081-5/+4
| |
* | Merge remote-tracking branch 'origin/ghc-head' into HEADalexbiehl2017-10-085-159/+164
|\ \ | |/ |/|
| * Make compatible with Prelude.<> export in GHC 8.4/base-4.11Herbert Valerio Riedel2017-09-212-1/+2
| |
| * Update for #14131Ryan Scott2017-08-233-11/+13
| |
| * Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-218-274/+308
| |\
| * | Rename extension index tagsAlan Zimmerman2017-06-052-23/+23
| | |
| * | Match new AST as per GHC wip/new-tree-one-paramAlan Zimmerman2017-06-055-145/+146
| | | | | | | | | | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
| * | Render (signature) only if it actually is a signature!Edward Z. Yang2017-04-221-2/+5
| | | | | | | | | | | | | | | | | | I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * | Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEADBen Gamari2017-03-231-43/+16
| |\ \
| * | | Render help documentation link next to (signature) in title.Edward Z. Yang2017-03-221-1/+8
| | | | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * | | Annotate signature docs with (signature)Edward Z. Yang2017-03-221-2/+5
| | | | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * | | Render signature module tree separately from modules.Edward Z. Yang2017-03-151-1/+16
| | | | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* | | | Add compile step that bundles and compresses JS files (#684)Tim Baumann2017-09-231-21/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme
* | | | Write meta.json when generating html output (#676)Alexander Biehl2017-08-301-0/+22
| | | |
* | | | QuickNav: Make docbase configurableAlexander Biehl2017-08-291-1/+6
| | | |