aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Hyperlinker
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Enable two warnings (#1245) (#1268)"Ben Gamari2020-12-151-1/+0
| | | | | | As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce.
* Enable two warnings (#1245) (#1268)tomjaguarpaw2020-12-101-0/+1
| | | | | because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
* GHC.Driver.Types refactoring (#1242)Sylvain Henry2020-10-261-1/+1
|
* Don't pass the HomeUnitId (#1239)Sylvain Henry2020-10-121-1/+0
|
* Adapt to GHC parser changesSylvain Henry2020-09-301-1/+2
|
* Update for parser (#1234)Sylvain Henry2020-09-291-3/+3
|
* Updates for the new linear types syntax: a %p -> bVladislav Zavialov2020-09-261-0/+1
|
* Match GHC for #18639, remove GENERATED pragmaAlan Zimmerman2020-09-071-2/+0
|
* Fix after HomeUnitSylvain Henry2020-08-121-1/+2
|
* Fix after Outputable refactoringSylvain Henry2020-08-052-2/+4
|
* Sync with GHC removing {-# CORE #-} pragmaKrzysztof Gogolewski2020-07-121-2/+0
| | | | See ghc ticket #18048
* Handle LexicalNegation's ITprefixminusVladislav Zavialov2020-06-281-0/+1
|
* Adapt Haddock for QualifiedDoMatthías Páll Gissurarson2020-06-261-2/+2
|
* Adapt Haddock to LinearTypesKrzysztof Gogolewski2020-06-172-2/+3
| | | | See ghc/ghc!852.
* Fix after unit refactoringSylvain Henry2020-06-081-1/+1
|
* update for hiefile-typeclass-infoZubin Duggal2020-05-241-14/+20
|
* Fix for GHC.Unit.* modulesSylvain Henry2020-04-271-1/+1
|
* Module structureSylvain Henry2020-04-243-7/+7
|
* Module renamingSylvain Henry2020-04-101-3/+4
|
* Modules: TypesSylvain Henry2020-03-183-9/+9
|
* Ignore the BufLoc/BufSpan added in GHC's !2516Vladislav Zavialov2020-02-281-6/+8
|
* Modules: Driver (#13009)Sylvain Henry2020-02-191-1/+1
|
* No MonadFail/Alternative for PVladislav Zavialov2020-02-161-26/+28
|
* Fix after Iface modules renamingSylvain Henry2020-01-022-5/+5
|
* Update Hyperlinker.Parser.classify to use ITdollarVladislav Zavialov2019-11-241-4/+2
|
* Remove spaces around @-patterns (#1093)Vladislav Zavialov2019-09-282-3/+3
| | | 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.
* Match GHC changes for T16185Alec Theriault2019-02-221-2/+2
| | | | | | | `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock.
* Parser changes to match !380Vladislav Zavialov2019-02-171-6/+9
|
* Remove workaround for now-fixed Clang CPP bug (#1028)Alec Theriault2019-02-111-45/+2
| | | | | | | | | | Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code).
* Use `.hie` files for the Hyperlinker backend (#977)Alec Theriault2019-01-315-545/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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
* [TTG: Handling Source Locations] Foundation and PatShayan-Najd2018-11-231-30/+48
| | | | | | | | | | | Trac Issues #15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`)
* Add ITcomment_line_prag token to Hyperlinker ParserBen Sklaroff2018-08-211-5/+6
| | | | | | | | | | This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935
* Handle -XStarIsTypeVladislav Zavialov2018-06-141-0/+1
|
* Complete FixitySig and FamilyDecl pattern matchesSimon Jakobi2018-06-131-0/+3
|
* Improve hyperlinker's 'spanToNewline' (#846)Alec Theriault2018-06-131-7/+25
| | | | | | | | | | | | | | | | 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes #837.
* 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').
* Filter out CRLFs in hyperlinker backend (#813)Alec Theriault2018-06-131-2/+7
| | | This prevents spurious lines from appearing in the final output.
* Remove `ITtildehsh` tokenSimon Jakobi2018-06-131-1/+0
|
* DerivingVia changesRyan Scott2018-06-131-6/+1
|
* Merge branch 'ghc-head' with 'ghc-8.4'Herbert Valerio Riedel2018-05-011-26/+28
|\
| * Match changes in GHC for TTGAlan Zimmerman2018-04-271-8/+10
| |
| * Match GHC for TTG implemented on HsBinds, D4581Alan Zimmerman2018-04-131-3/+3
| |
| * Match GHC changes for TTGAlan Zimmerman2018-04-091-8/+8
| |
* | Don't treat fixity signatures like declarationsalexbiehl2018-04-201-1/+1
| |
* | Hyperlinker: Links for TyOps, class methods and associated typesalexbiehl2018-03-051-1/+14
| |
* | 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.
* | 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
| |