aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
Commit message (Collapse)AuthorAgeFilesLines
* Comment C, which clarifies why e.g. ReadP is not enoughOleg Grenrus2019-05-131-0/+7
|
* Redo ParseModuleHeaderOleg Grenrus2019-05-131-93/+125
|
* Support value/type namespaces on identifier linksAlec Theriault2019-02-251-2/+1
| | | | | | | | | | | 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)
* @since includes package name (#749)Alec Theriault2018-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Add `SPDX-License-Identifier` as alised for "license" module header tokensHerbert Valerio Riedel2018-02-051-5/+6
| | | | | | | | | | | C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from #743
* Fix #280. Parsing of module headerSebastian Meric de Bellefon2016-05-151-1/+1
| | | | The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines
* Remove now redundant importsMateusz Kowalczyk2015-03-261-1/+0
|
* Allow the parser to spit out meta-infoMateusz Kowalczyk2014-12-101-1/+1
| | | | | | | | | | | | | | | 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/+150