- Jan 31, 2019
-
-
Alec Theriault authored
# 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
-
- Jun 13, 2018
-
-
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').
-
- May 08, 2018
-
-
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').
-
- Feb 01, 2018
-
-
-
* 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
-
- Aug 02, 2015
-
-
- Jul 06, 2015
-
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
- Jul 05, 2015
-
-
Łukasz Hanuszczak authored
-
- Jul 01, 2015
-
-
Łukasz Hanuszczak authored
-
- Jun 30, 2015
-
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-
Łukasz Hanuszczak authored
-