aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Create.hs
Commit message (Collapse)AuthorAgeFilesLines
* @since includes package name (#749)Alec Theriault2018-03-271-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* extractDecl: Extract constructor patterns from data family instances (#776)Alexander Biehl2018-03-131-13/+26
| | | | | | * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors
* Fix file handle leak (#763) (#764)Alec Theriault2018-02-251-3/+6
| | | | Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137.
* Teach the HTML backend how to render methods with multiple namesalexbiehl2018-02-191-25/+1
|
* Add 'show' option to complement 'hide' (#752)Alec Theriault2018-02-111-10/+11
| | | | | | | | | | | | * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes #751 and #266. * Add a '--show-all' option
* Expand SigD in a better placealexbiehl2018-02-091-2/+2
| | | | | | | | In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place.
* fullModuleContents: support named docsalexbiehl2018-02-061-16/+24
|
* Expand SigDsalexbiehl2018-02-061-2/+26
|
* Use the GHC lexer for the Hyperlinker backend (#714)Alec Theriault2018-02-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix duplicate declarations and TypeFamilies specificsalexbiehl2018-01-201-17/+29
|
* extractDecl: Extract associated types correctly (#736)Alexander Biehl2018-01-191-11/+21
|
* Revert "Match changes for Trees that Grow in GHC"Ben Gamari2017-11-211-16/+14
| | | | This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547.
* Revert "Match Trees That Grow"Ben Gamari2017-11-211-2/+2
| | | | This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c.
* Revert "Clean up use of PlaceHolder, to match TTG"Ben Gamari2017-11-211-8/+8
| | | | This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049.
* Clean up use of PlaceHolder, to match TTGAlan Zimmerman2017-11-141-8/+8
|
* Match Trees That GrowAlan Zimmerman2017-11-081-2/+2
|
* Match changes for Trees that Grow in GHCAlan Zimmerman2017-11-071-14/+16
|
* Always return documentation for exported subordinatesalexbiehl2017-11-021-12/+17
| | | | | | | ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks.
* Make better use of AvailInfoalexbiehl2017-11-011-57/+72
|
* Remove excessive use of list comprehensionsalexbiehl2017-10-311-12/+7
|
* fullModuleContents traverses exports in declaration orderalexbiehl2017-10-311-6/+11
|
* Precise Haddock: Use Avails for export resolution (#688)Alexander Biehl2017-10-081-220/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting
* Account for "Remember the AvailInfo for each IE"Ben Gamari2017-09-051-1/+1
| | | | | | As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building.
* Update for #14131Ryan Scott2017-08-231-12/+16
|
* Revert "Drop Avails from export list"alexbiehl2017-08-221-1/+1
| | | | This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def.
* Drop Avails from export listalexbiehl2017-08-211-1/+1
|
* Merge remote-tracking branch 'origin/master' into ghc-headalexbiehl2017-08-211-122/+262
|\
| * Refactoring: Make doc renaming monadicalexbiehl2017-08-161-56/+71
| | | | | | | | This allows us to later throw warnings if can't find an identifier
| * Fix: Generate pattern signatures for constructors exported as patterns (#663)Tim Baumann2017-08-061-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes #653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR #663 * Fix extractPatternSyn error message
| * Document record fields when DuplicateRecordFields is enabled (#649)Alex Biehl2017-07-031-1/+1
| |
| * Make per-argument docs for class methods work again (#648)Alex Biehl2017-06-291-2/+3
| | | | | | | | | | | | * Make per-argument docs for class methods work again * Test case
| * Don't include names with empty subordinates in maps (#644)Alex Biehl2017-06-231-1/+9
| | | | | | These are unecessary anyway and just blow up interface size
| * Haddock support for bundled pattern synonyms (#627)Christiaan Baaij2017-06-091-57/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after #631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case
| * Use NameSet for isExported check (#632)Alex Biehl2017-06-041-3/+3
| |
| * Allow user defined signatures for pattern synonyms (#631)Alex Biehl2017-06-031-0/+1
| |
| * Expand signatures for class declarationsAlexander Biehl2017-04-251-7/+17
| |
| * Explicit import list ofr Control.DeepSeq in Haddock.Interface.Createalexbiehl2017-04-111-1/+1
| |
| * Read files for hyperlinker eagerlyalexbiehl2017-04-111-4/+8
| | | | | | | | This also exposes Documentation.Haddock.Utf8
| * Better Backpack support with signature merging.Edward Z. Yang2017-03-231-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3)
| * TODO on moduleExports.Edward Z. Yang2017-03-231-1/+5
| | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e)
| * More docs.Edward Z. Yang2017-03-231-0/+5
| | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a)
| * Documentation.Edward Z. Yang2017-03-231-5/+22
| | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc)
| * Add a field marking if interface is a signature or not.Edward Z. Yang2017-03-231-0/+1
| | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858)
| * Correctly handle Backpack identity/semantic modules.Edward Z. Yang2017-03-231-21/+54
| | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737)
| * Merge branch 'ghc-head'Ben Gamari2017-03-101-22/+34
| |\
* | | Rename extension index tagsAlan Zimmerman2017-06-051-31/+31
| | |
* | | Match new AST as per GHC wip/new-tree-one-paramAlan Zimmerman2017-06-051-33/+34
| | | | | | | | | | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow
* | | Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEADBen Gamari2017-03-231-4/+12
|\| |
| * | Remove misplaced haddock commentalexbiehl2016-05-261-1/+1
| | |
| * | Don't consider default class ops when looking for declsBen Gamari2016-05-221-2/+7
| | | | | | | | | | | | | | | When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of #505.