aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Parser.hs
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/ghc-9.4'Ben Gamari2022-08-051-1/+1
|\
| * Adapt Haddock to Logger and Parser changes (#1399)Sylvain Henry2021-06-011-1/+1
| |
* | Follow hlint, remove language pragmas in libs. (#1478)Phil de Joux2022-05-031-1/+0
|/
* Merge remote-tracking branch 'origin/ghc-9.0' into ghc-headBen Gamari2021-01-131-13/+29
|\
| * Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-13/+29
| |\
| | * Disallow qualified uses of reserved identifiersAlec Theriault2020-03-271-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes #952
| | * Better identifier parsingAlec Theriault2019-02-251-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '(<|>)' 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-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | Update for parser (#1234)Sylvain Henry2020-09-291-2/+3
|/ /
* | Module structureSylvain Henry2020-04-241-2/+2
| |
* | Module renamingSylvain Henry2020-04-101-2/+2
| |
* | Modules: TypesSylvain Henry2020-03-201-2/+2
| |
* | Modules: Driver (#13009)Sylvain Henry2020-02-191-1/+1
|/
* Refactor names + unused functions (#982)Alec Theriault2018-12-171-13/+9
| | | | | | | This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions
* @since includes package name (#749)Alec Theriault2018-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Allow the parser to spit out meta-infoMateusz Kowalczyk2014-12-101-2/+2
| | | | | | | | | | | | | | | 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/+44