aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface.hs
Commit message (Collapse)AuthorAgeFilesLines
* Add UnitId to Target recordFendor2021-03-271-1/+1
| | | | | | This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time.
* Match changes in GHC AST for in-tree API AnnotationsAlan Zimmerman2021-03-151-1/+1
| | | | As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418
* Fix the call-site of guessTarget in Interface.hsHécate Moonlight2021-02-231-2/+2
| | | | Explicit the imports from GHC.HsToCore.Docs
* Explicit imports for Haddock.Interface and Haddock.Interface.CreateHécate Moonlight2021-02-221-23/+25
|
* Clean-up of Interface and Interface.Create's imports and pragmataHécate Moonlight2021-02-221-12/+11
|
* Add UnitId to Target recordFendor2021-02-091-1/+1
|
* Fix to build with HEADSylvain Henry2021-02-091-2/+1
|
* Merge pull request #1310 from hsyl20/wip/hsyl20/logger2Alexander Biehl2021-02-081-7/+11
|\ | | | | Logger refactoring
| * Update for LoggerSylvain Henry2021-02-081-7/+11
| |
* | Merge branch 'ghc-head' into ghc-9.0alexbiehl-gc2021-02-071-98/+217
|\|
| * Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-mergeBen Gamari2021-02-061-99/+213
| |\
| | * Abstract Monad for interface creationAlex Biehl2021-01-091-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName.
| | * Make Haddock a GHC PluginAlex Biehl2021-01-091-96/+212
| | |
| | * Prepare Haddock for being a GHC PluginAlex Biehl2021-01-091-1/+7
| | |
| * | Merge remote-tracking branch 'origin/ghc-9.0' into ghc-headBen Gamari2021-01-131-4/+12
| |\ \ | | |/ | |/|
| * | Support a new ghc --make node type for parallel backpack upsweepJohn Ericson2020-12-281-2/+4
| | |
| * | Adapt to changes to GlobalRdrElt and AvailInfoAdam Gundry2020-12-231-2/+2
| | | | | | | | | | | | Needed for ghc/ghc!4467
| * | DynFlags's unit fields moved to HscEnvSylvain Henry2020-11-301-2/+3
| | |
| * | GHC.Driver.Types refactoring (#1242)Sylvain Henry2020-10-261-1/+2
| | |
| * | Fix after HomeUnitSylvain Henry2020-08-121-2/+3
| | |
* | | simplify calculating percentages fixing #1194 (#1236)Willem Van Onsem2021-02-071-2/+1
| |/ |/|
* | Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-4/+11
|\ \ | |/ |/|
| * simplify calculating percentages fixing #1194 (#1236)Willem Van Onsem2020-12-081-1/+1
| |
| * Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243)Xia Li-yao2020-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with #1112 from @wygulmage and #1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix #1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt@mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem@users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard@tweag.io> Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
| * Use floor over round to calculate the percentage (#1195)Willem Van Onsem2020-05-251-1/+1
| | | | | | | | | | | | If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes #1194
| * Remove unused `Haddock.Utils` functionsAlec Theriault2020-03-281-0/+1
| | | | | | | | | | | | | | * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils`
| * Clean up warningsAlec Theriault2020-03-221-1/+1
| | | | | | | | | | | | * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal`
| * Merge branch 'ghc-8.8' into ghc-8.10Alec Theriault2020-03-201-2/+8
| |\
| | * Remove Haddock's dependency on `Cabal`Alec Theriault2019-05-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries).
| | * Merge branch 'ghc-8.6' into ghc-8.8Alec Theriault2019-03-031-1/+8
| | |\
| | | * Load plugins when compiling each module (#983)Alec Theriault2018-12-201-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code
* | | | Use functions exported from HsToCoreZubin Duggal2020-06-211-0/+1
| | | |
* | | | Fix after unit refactoringSylvain Henry2020-06-081-1/+1
| | | |
* | | | isBootSummary now produces a result of type IsBootInterfaceCale Gibbard2020-05-211-56/+57
| | | |
* | | | Fix for GHC.Unit.* modulesSylvain Henry2020-04-271-1/+1
| | | |
* | | | Module structureSylvain Henry2020-04-241-3/+3
| | | |
* | | | Module renaming: amend previous patchSylvain Henry2020-04-051-1/+1
| | | |
* | | | Modules: type checkerSylvain Henry2020-03-301-1/+1
| | | |
* | | | Modules: TypesSylvain Henry2020-03-201-4/+4
| | | |
* | | | Ignore the BufLoc/BufSpan added in GHC's !2516Vladislav Zavialov2020-02-281-1/+1
| | | |
* | | | Modules: Driver (#13009)Sylvain Henry2020-02-191-2/+2
|/ / /
* / / Refactor for withTiming changes.Andreas Klebinger2019-10-211-4/+4
|/ /
* | Use `.hie` files for the Hyperlinker backend (#977)Alec Theriault2019-01-311-45/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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
* | Fix warnings, accept outputAlec Theriault2018-12-121-1/+0
|/ | | | | | | * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's
* Merge branch 'ghc-8.4' into ghc-8.6Alec Theriault2018-10-161-0/+1
|\
| * Avoid "invalid argument (invalid character)" on non-unicode Windows (#892)Yuji Yamamoto2018-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566
| * Renamer: Warn about ambiguous identifiers (#831)Simon Jakobi2018-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes #830. * Deduplicate warnings Fixes #832.
* | Accumulate explicitly which modules to load for 'attachInstances'Alec Theriault2018-08-211-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old approach to fixing #469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1)
* | Renamer: Warn about ambiguous identifiers (#831)Simon Jakobi2018-06-131-2/+2
|/ | | | | | | | | | | | | | | | | | | * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes #830. * Deduplicate warnings Fixes #832.
* Useful cost centres, timers and allocation counters (#785)Alexander Biehl2018-03-231-7/+14
| | | | | | | | | * 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.