| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
|\ \
| |/
|/| |
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
because they will be soon be added to -Wall.
See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It is possible to fail to extract an HIE ast. This is however not a
reason to produce _no_ output - we should still make a colorized HTML
page.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where
lines that started with an octothorpe but turned out not
to lex like pragmas would have an extra line added after them.
Since this bug has been fixed upstream and that it doesn't have dire
consequences anyways, the workaround is not really worth it
anymore - we can just tell people to update their clang version (or re-structure
their pragma code).
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
because they will be soon be added to -Wall.
See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As this does not build on GHC `master`.
This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
because they will be soon be added to -Wall.
See https://gitlab.haskell.org/ghc/ghc/-/issues/15656
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | | |
See ghc ticket #18048
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
See ghc/ghc!852.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| |
| |
| | |
This is needed to compile `haddock` when [GHC Proposal #229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented.
|
| |
| |
| |
| |
| |
| |
| | |
`FunTy` now has an `AnonArgFlag` that indicates whether the arrow is
a `t1 => t2` or `t1 -> t2`.
This commit shouldn't change any functionality in Haddock.
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where
lines that started with an octothorpe but turned out not
to lex like pragmas would have an extra line added after them.
Since this bug has been fixed upstream and that it doesn't have dire
consequences anyways, the workaround is not really worth it
anymore - we can just tell people to update their clang version (or re-structure
their pragma code).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# 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
|
|
|
|
|
|
|
|
|
|
|
| |
Trac Issues #15495
This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A).
- the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced
- some instances of `HasSrcSpan` are introduced
- some constructors `L` are replaced with `cL`
- some patterns `L` are replaced with `dL->L` view pattern
- some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`)
|
|
|
|
|
|
|
|
|
|
| |
This token is necessary for parsing #line pragmas inside nested comments.
Reviewers: bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D4935
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'spanToNewline' is used to help break apart the source into lines which
can then be partioned into CPP and non-CPP chunks. It is important that
'spanToNewline' not break apart tokens, so it needs to properly handle
things like
* block comments, possibly nested
* string literals, possibly multi-line
* CPP macros, possibly multi-line
String literals in particular were not being properly handled. The fix
is to to fall back in 'Text.Read.lex' to help lex things that are not
comments.
Fixes #837.
|
|
|
|
|
| |
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').
|
|
|
| |
This prevents spurious lines from appearing in the final output.
|
| |
|
| |
|