aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface.hs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Update the GblRdrEnv when processing modulesAlec Theriault2018-02-011-0/+14
| | | | | Without a complete environment, we will miss some instances that were encountered during typechecking.
* Merge remote-tracking branch 'origin/ghc-head' into HEADalexbiehl2017-10-081-17/+2
|\
| * Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-0/+12
| |\
| * | Rename extension index tagsAlan Zimmerman2017-06-051-1/+1
| | |
| * | Match new AST as per GHC wip/new-tree-one-paramAlan Zimmerman2017-06-051-1/+1
| | | | | | | | | | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
| * | Don't enable compilation for template haskell (#624)Doug Wilson2017-05-271-16/+1
| | | | | | | | | | | | This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa
* | | Inhibit output of coverage information for hidden modules. (#687)Merijn Verstraaten2017-10-041-6/+7
| |/ |/| | | | | | | | | * Inhibit output of coverage information for hidden modules. * Add changelog entry.
* | Remove redudant import warning (#651)Alex Biehl2017-07-071-4/+5
| |
* | Avoid errors on non UTF-8 Windows (#566)Yuji Yamamoto2017-07-041-0/+11
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1)
* Merge remote-tracking branch 'phadej/orphans' into ghc-headBen Gamari2015-12-201-1/+1
|\
| * Have source links for orphan instancesOleg Grenrus2015-09-281-1/+1
| |
* | Remove redundant constraints from haddock, discovered by ↵Simon Peyton Jones2015-12-141-1/+1
|/ | | | -fwarn-redundant-constraints
* Print missing docs by defaultMateusz Kowalczyk2014-12-181-1/+1
| | | | Adds --no-print-missing-docs
* Move sources under haddock-api/srcMateusz Kowalczyk2014-08-231-0/+244