aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/LexParseRn.hs
Commit message (Collapse)AuthorAgeFilesLines
* Minimum changes needed for compilation with hi-haddockMatthew Pickering2022-03-221-3/+9
| | | | | | With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC.
* Implement template-haskell's putDocLuke Lau2021-03-101-2/+2
| | | | | | | | | This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int
* Merge branch 'ghc-head' into ghc-9.0alexbiehl-gc2021-02-071-9/+14
|\
| * Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-mergeBen Gamari2021-02-061-2/+3
| |\
| | * Abstract Monad for interface creationAlex Biehl2021-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName.
| * | Merge remote-tracking branch 'origin/ghc-9.0' into ghc-headBen Gamari2021-01-131-28/+65
| |\ \ | | |/ | |/|
| * | Adapt to changes to GlobalRdrElt and AvailInfoAdam Gundry2020-12-231-2/+2
| | | | | | | | | | | | Needed for ghc/ghc!4467
| * | Fix after Outputable refactoringSylvain Henry2020-08-051-1/+1
| | |
* | | Add support for labeled module referencesIñaki García Etxebarria2021-02-071-1/+1
| |/ |/| | | | | | | | | | | | | | | | | Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label".
* | Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-35/+68
|\ \ | |/ |/|
| * Clean up warningsAlec Theriault2020-03-221-1/+1
| | | | | | | | | | | | * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal`
| * Fix bogus identifier defaultingAlec Theriault2019-02-261-9/+5
| | | | | | | | | | | | | | | | This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes #1035.
| * Better identifier parsingAlec Theriault2019-02-251-25/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '(<|>)' 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-13/+42
| | | | | | | | | | | | | | | | | | | | | | 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)
* | Module structureSylvain Henry2020-04-241-2/+2
| |
* | Modules: TypesSylvain Henry2020-03-201-3/+3
| |
* | Modules: Driver (#13009)Sylvain Henry2020-02-191-1/+1
| |
* | hsyl20-modules-renamerSylvain Henry2020-01-071-1/+1
|/
* Merge branch 'ghc-8.6' into ghc-headAlec Theriault2018-11-101-2/+1
|\
| * Fix typo in a warningSimon Jakobi2018-10-231-2/+1
| |
| * outOfScope: Recommend qualifying the identifierSimon Jakobi2018-07-201-1/+3
| |
| * Don't warn about ambiguous identifiers when the candidate names belong to ↵Simon Jakobi2018-07-201-18/+35
| | | | | | | | | | | | | | | | | | | | the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes #854.
* | Support hyperlink labels with inline markupAlec Theriault2018-11-061-1/+1
| | | | | | | | The parser for pictures hasn't been properly adjusted yet.
* | Don't warn about ambiguous identifiers when the candidate names belong to ↵Simon Jakobi2018-07-201-18/+35
| | | | | | | | | | | | | | | | | | | | | | | | the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes #854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f)
* | outOfScope: Recommend qualifying the identifierSimon Jakobi2018-07-201-1/+3
|/ | | | (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7)
* Fix redundant import warningsSimon Jakobi2018-06-131-1/+0
|
* Renamer: Warn about ambiguous identifiers (#831)Simon Jakobi2018-06-131-3/+17
| | | | | | | | | | | | | | | | | | | * 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.
* Renamer: Warn about out of scope identifiers. (#819)Simon Jakobi2018-06-131-6/+11
|
* Adjust to new HsDocString internalsSimon Jakobi2018-06-131-8/+7
|
* @since includes package name (#749)Alec Theriault2018-03-271-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Warning free compilationAlexander Biehl2018-02-011-1/+0
|
* Grid Tables (#718)Oleg Grenrus2018-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-39/+42
|\
| * Refactoring: Make doc renaming monadicalexbiehl2017-08-161-39/+42
| | | | | | | | This allows us to later throw warnings if can't find an identifier
* | Adapt to EnumSetBen Gamari2017-03-151-1/+2
|/
* Fix the documentation for haddock itself.Dominic Steinitz2015-12-211-0/+1
| | | | | | | | | | | | | | | 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
* Handle inline math with mathjax.Dominic Steinitz2015-12-211-0/+1
|
* Update for D1200Ben Gamari2015-12-161-2/+3
|
* WarningsMatthew Pickering2015-12-141-1/+0
|
* Track the new location of setRdrNameSpaceSimon Peyton Jones2015-12-141-1/+2
|
* Clearly default to variables in out of scope caseMateusz Kowalczyk2015-03-271-23/+40
|
* Remove now redundant importsMateusz Kowalczyk2015-03-261-1/+0
|
* Allow the parser to spit out meta-infoMateusz Kowalczyk2014-12-101-20/+15
| | | | | | | | | | | | | | | Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes #26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves.
* Move sources under haddock-api/srcMateusz Kowalczyk2014-08-231-0/+146