aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
Commit message (Collapse)AuthorAgeFilesLines
* update for hiefile-typeclass-infoZubin Duggal2020-05-241-14/+20
|
* Fix for GHC.Unit.* modulesSylvain Henry2020-04-271-1/+1
|
* Module structureSylvain Henry2020-04-241-1/+1
|
* Modules: TypesSylvain Henry2020-03-181-4/+4
|
* Fix after Iface modules renamingSylvain Henry2020-01-021-1/+1
|
* Remove spaces around @-patterns (#1093)Vladislav Zavialov2019-09-281-2/+2
| | | This is needed to compile `haddock` when [GHC Proposal #229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented.
* Use `.hie` files for the Hyperlinker backend (#977)Alec Theriault2019-01-311-75/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see #998) * restructure temporary folder logic for `.hi`/`.hie` model
* Remove 'TokenGroup' from Hyperlinker (#818)Alec Theriault2018-06-131-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').
* Warning free compilationAlexander Biehl2018-02-011-1/+0
|
* Use the GHC lexer for the Hyperlinker backend (#714)Alec Theriault2018-02-011-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Make hyperlinked source renderer generate line anchors.Łukasz Hanuszczak2015-08-021-3/+23
|
* Add support for hyperlinking modules in import lists.Łukasz Hanuszczak2015-07-061-12/+9
|
* Move source paths types to hyperlinker types module.Łukasz Hanuszczak2015-07-061-1/+0
|
* Extract main hyperlinker types to separate module.Łukasz Hanuszczak2015-07-061-2/+2
|
* Refactor source path mapping to use modules as indices.Łukasz Hanuszczak2015-07-051-19/+17
|
* Make hyperlinker render qualified names as one entity.Łukasz Hanuszczak2015-07-011-5/+45
|
* Disable generating hyperlinks for module references.Łukasz Hanuszczak2015-06-301-2/+9
|
* Add basic support for cross-package hyperlink generation.Łukasz Hanuszczak2015-06-301-16/+26
|
* Rewrite source generation to fixed links and directory structure.Łukasz Hanuszczak2015-06-301-31/+21
|
* Make external hyperlinks point to locations specified by source URLs.Łukasz Hanuszczak2015-06-301-21/+31
|
* Add support for fancy highlighting upon hovering over identifier.Łukasz Hanuszczak2015-06-301-8/+15
|
* Implement hyperlinking of imported module names.Łukasz Hanuszczak2015-06-301-11/+17
|
* Refactor the way AST names are handled within detailed tokens.Łukasz Hanuszczak2015-06-301-7/+10
|
* Fix external anchors to contain HTML file extension.Łukasz Hanuszczak2015-06-301-1/+1
|
* Add support for type declaration anchors.Łukasz Hanuszczak2015-06-301-3/+11
|
* Implement go-to-definition mechanism for local bindings.Łukasz Hanuszczak2015-06-301-7/+23
|
* Add support for binding token recognition.Łukasz Hanuszczak2015-06-301-0/+1
|
* Add support for type token recognition.Łukasz Hanuszczak2015-06-301-23/+41
|
* Constrain elements exported by hyperlinker modules.Łukasz Hanuszczak2015-06-301-1/+1
|
* Add dummy support for hyperlinking named tokens.Łukasz Hanuszczak2015-06-301-3/+20
|
* Add support for recognizing compiler pragmas in source parser.Łukasz Hanuszczak2015-06-301-0/+1
|
* Add support for specifying the CSS file path in HTML source renderer.Łukasz Hanuszczak2015-06-301-15/+30
|
* Create simple HTML renderer for parsed source file.Łukasz Hanuszczak2015-06-301-0/+26