aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock.hs
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* | Load plugins when starting a GHC session (#905)Matthew Pickering2018-08-211-1/+5
| | | | | | Fixes #900
* | Let `haddock-test` bypass interface version check (#890)Alec Theriault2018-07-201-5/+16
|/ | | | | | | | | This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to.
* @since includes package name (#749)Alec Theriault2018-03-271-43/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Useful cost centres, timers and allocation counters (#785)Alexander Biehl2018-03-231-20/+39
| | | | | | | | | * 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.
* Filter RTS arguments from 'ghc-options' arguments (#725)Alec Theriault2018-02-011-2/+15
| | | This fixes #666.
* Use the GHC lexer for the Hyperlinker backend (#714)Alec Theriault2018-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-10-311-7/+30
|\
| * Reexported modules: Report warnings if argument cannot be parsed oralexbiehl2017-10-311-7/+10
| | | | | | | | ... module cannot be found
| * Supported reexported-modules via --reexport flag.Edward Z. Yang2017-10-311-1/+19
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Put Quickjump behind --quickjump flag (#697)Alexander Biehl2017-10-301-5/+7
| |
| * Add QuickJump version to meta.json (#696)Alexander Biehl2017-10-301-1/+1
| |
* | Merge remote-tracking branch 'origin/ghc-head' into HEADalexbiehl2017-10-081-4/+17
|\ \ | |/ |/|
| * Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-18/+29
| |\
| * | Disable pattern match warnings (#628)Doug Wilson2017-06-031-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns
| * | Haddock: Fix broken lazy IO in prologue reading (#615)Ben Gamari2017-05-121-2/+3
| | | | | | | | | | | | | | | We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle.
| * | Merge pull request #568 from awson/ghc-headAlex Biehl2017-03-231-1/+1
| |\ \ | | | | | | | | Prevent GHC API from doing optimization passes.
| | * | Prevent GHC API from doing optimization passes.Kyrill Briantsev2017-01-121-1/+1
| | | |
| * | | Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEADBen Gamari2017-03-231-1/+1
| |\ \ \
* | | | | Write meta.json when generating html output (#676)Alexander Biehl2017-08-301-2/+4
| |_|_|/ |/| | |
* | | | Provide --show-interface option to dump interfaces (#645)Alexander Biehl2017-08-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated.
* | | | Make haddock-library and haddock-api warning free (#626)Alex Biehl2017-05-301-6/+6
| | | |
* | | | Haddock: Fix broken lazy IO in prologue reading (#615)Alex Biehl2017-05-121-2/+3
| | | | | | | | | | | | | | | | | | | | We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle.
* | | | Improve error messageSergey Vinokurov2017-04-291-1/+1
| | | |
* | | | Travis: Use ghc-8.2.1 on masteralexbiehl2017-04-251-9/+16
| | | |
* | | | Prevent GHC API from doing optimization passes.Kyrill Briantsev2017-04-111-1/+1
| | | |
* | | | Merge branch 'ghc-head'Ben Gamari2017-03-101-13/+11
|\| | | | |/ / |/| |
| * | Kill remaining static flagsBen Gamari2017-02-021-12/+2
| |/
| * haddock-api: Don't use stdcall calling convention on 64-bit WindowsBen Gamari2016-12-091-1/+9
| | | | | | | | See GHC #12890.
* | do not create empty src directorySebastian Meric de Bellefon2016-06-221-1/+1
|/ | | | Fix #536.
* Use -fprint-unicode-syntax when --use-unicode is enabledBen Gamari2016-02-081-4/+7
| | | | | This allows GHC to render `*` as its Unicode representation, among other things.
* Make sure --mathjax affects all written HTML filesJoachim Breitner2016-01-191-1/+1
| | | | This fixes #475.
* Fix the documentation for haddock itself.Dominic Steinitz2015-12-211-2/+3
| | | | | | | | | | | | | | | Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs
* Changes to compile with 8.0Matthew Pickering2015-12-141-1/+1
|
* s/PackageKey/UnitId/g and s/packageKey/unitId/gEdward Z. Yang2015-12-141-3/+3
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Create Process: removed PhaseFailedTamar Christina2015-12-141-5/+2
|
* Override source line flags when source hyperlinker is enabled.Ɓukasz Hanuszczak2015-08-021-2/+7
|