aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock.hs
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'upstream/ghc-9.4' into ghc-9.4Yuchen Pei2022-07-211-20/+26
|\
| * coot/multiple package (ghc-head) (#1419)Marcin Szamotulski2021-08-161-23/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".".
| * Adapt Haddock to Logger and Parser changes (#1399)Sylvain Henry2021-06-011-7/+10
| |
| * Fix after NameCache changesSylvain Henry2021-03-221-9/+12
| |
* | Merge remote-tracking branch 'upstream/main'Yuchen Pei2022-07-211-1/+0
|\ \
| * | Follow hlint suggestion: unused LANGUAGE pragma. (#1504)Phil de Joux2022-07-191-1/+0
| | | | | | | | | | | | | | | * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests.
* | | Preparing for publication.Yuchen Pei2022-07-181-1/+1
| | | | | | | | | | | | | | | | | | - license - cabal - readme
* | | Adding org backend.Yuchen Pei2022-07-181-1/+6
|/ /
* | Fix #783 Don't show button if --quickjump not presentMike Pilgrem2022-06-121-1/+2
| |
* | Render module tree per package in the content page (#1492)Marcin Szamotulski2022-06-071-17/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version.
* | Use visibility to decide which interfaces are included in quickjump (#1490)Marcin Szamotulski2022-05-251-1/+4
| | | | | | | | This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision.
* | Allow to hide interfaces when rendering multiple components (#1487)Marcin Szamotulski2022-05-211-18/+19
| | | | | | | | | | This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package.
* | coot/multiple packages (ghc-9.2) (#1418)Marcin Szamotulski2021-08-081-23/+58
|/
* Fix to build with HEADSylvain Henry2021-02-091-1/+0
|
* Update for LoggerSylvain Henry2021-02-081-17/+19
|
* Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-mergeBen Gamari2021-02-061-1/+6
|\
| * Add -j[n] CLI param to Haddock executableAlex Biehl2021-01-091-1/+6
| | | | | | | | It translates to `--ghcopt=-j[n]`
* | Merge remote-tracking branch 'origin/ghc-9.0' into ghc-headBen Gamari2021-01-131-9/+8
|\ \ | |/ |/|
| * Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-9/+8
| |\
| | * 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`
| | * Merge branch 'ghc-8.8' into ghc-8.10Alec Theriault2020-03-201-8/+6
| | |\
| | | * Fix crash when there are no srcspans in the file due to CPPZubin Duggal2019-10-071-1/+1
| | | |
| | | * Merge branch 'ghc-8.6' into ghc-8.8Alec Theriault2019-03-031-6/+3
| | | |\
| | | | * `--show-interface` should output to stdout. (#1040)Alec Theriault2019-02-281-1/+2
| | | | | | | | | | | | | | | Fixes #864.
| | | | * Load plugins when compiling each module (#983)Alec Theriault2018-12-201-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code
| | | * | Better identifier parsingAlec Theriault2019-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental).
| | | * | Support value/type namespaces on identifier linksAlec Theriault2019-02-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity)
* | | | | DynFlags's unit fields moved to HscEnvSylvain Henry2020-11-301-13/+13
| | | | |
* | | | | Fix after Plugins moved into HscEnvSylvain Henry2020-11-161-4/+5
| | | | |
* | | | | Fix after HomeUnitSylvain Henry2020-08-121-1/+0
| | | | |
* | | | | Rename hsctarget into backendSylvain Henry2020-07-021-3/+4
|/ / / /
* | | | Fix after unit refactoringSylvain Henry2020-06-081-3/+4
| | | |
* | | | Fix after Config module renamingSylvain Henry2020-05-141-1/+1
| | | |
* | | | Fix for GHC.Unit.* modulesSylvain Henry2020-04-271-2/+1
| | | |
* | | | UnitId has been renamed into UnitSylvain Henry2020-04-271-5/+5
| | | |
* | | | Module structureSylvain Henry2020-04-241-3/+3
| | | |
* | | | Module renamingSylvain Henry2020-04-101-1/+0
| | | |
* | | | Modules: TypesSylvain Henry2020-03-181-1/+1
| | | |
* | | | Modules: Driver (#13009)Sylvain Henry2020-02-191-2/+2
| | | |
* | | | Module hierarchy: runtime (cf #13009)Sylvain Henry2020-02-101-2/+2
|/ / /
* | | Refactor for withTiming changes.Andreas Klebinger2019-10-211-5/+5
| | |
* | | Remove reference to Opt_SplitObjs flagBen Gamari2019-03-041-2/+1
| | | | | | | | | | | | Split-objects has been removed.
* | | Clean up logic for guessing `-B` and `--lib` (#1026)Alec Theriault2019-02-131-76/+71
|/ / | | | | | | | | | | | | | | | | | | Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works.
* | Use `.hie` files for the Hyperlinker backend (#977)Alec Theriault2019-01-311-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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
* | Merge branch 'ghc-8.6' into ghc-headAlec Theriault2018-11-101-10/+17
|\|
| * Avoid some partialityAlec Theriault2018-10-261-10/+17
| | | | | | | | | | | | | | | | AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes #569.
* | Merge branch 'ghc-8.6' into ghc-headAlec Theriault2018-10-161-3/+8
|\|
| * Merge branch 'ghc-8.4' into ghc-8.6Alec Theriault2018-10-161-3/+8
| |\
| | * Make --package-version optional for --hoogle generation (#899)Alexander Biehl2018-08-061-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion
| * | Load plugins when starting a GHC session (#905)Matthew Pickering2018-08-211-1/+5
| |/ | | | | | | | | | | Fixes #900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d)