aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Create.hs
Commit message (Collapse)AuthorAgeFilesLines
* print haddock coverage info on stdout when generating docsSimon Michael2010-09-221-2/+10
| | | | | | A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability.
* Get rid of GhcModule and related cruftDavid Waern2010-08-261-15/+18
| | | | We can get everything we need directly from TypecheckedModule.
* isLocalAndTypeInferenced: fix for local module names overlapping package modulesSimon Marlow2010-06-221-2/+6
|
* Position the module header the same way everywhereDavid Waern2010-05-131-1/+0
| | | | Silly, but nice with some consistency :-)
* ModuleMap -> IfaceMapDavid Waern2010-05-131-4/+4
|
* Fix #112David Waern2010-04-101-20/+23
| | | | | | | | No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds.
* Remove unused ifaceLocalsdavid.waern2010-02-241-2/+0
|
* Fix Haddock markup error in commentdavid.waern2010-02-221-1/+1
|
* Remove unnecessary (and inexplicable) uses of nubDavid Waern2010-01-221-2/+2
|
* Remove bad whitespace and commented-out piecesDavid Waern2009-11-271-65/+61
|
* Comments on instancesDavid Waern2009-11-241-6/+28
| | | | | | | | | | | | | | | Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances
* Remove commented-out codeDavid Waern2009-11-151-8/+0
|
* hlint policeDavid Waern2009-11-141-7/+7
|
* Move toHsInstHead to Haddock.Convert and call it synifyInstHeadDavid Waern2009-09-061-1/+1
|
* Eradicate wrong runtime warning for type-inferenced exported-functionsIsaac Dupree2009-08-241-2/+49
| | | | see the long comment in the patch for why I did it this way :-)
* refactor out subordinatesWithNoDocsIsaac Dupree2009-08-241-2/+14
| | | | dep of inferenced-decls fix
* Improve behavior for unfindable .haddockIsaac Dupree2009-08-231-26/+46
|
* cross-package fnArgDocs. WARNING: changes .haddock binary formatIsaac Dupree2009-08-231-7/+6
| | | | | | | | | | | | | | | | While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done!
* re-implement function-argument docsIsaac Dupree2009-08-231-15/+29
| | | | | | | ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently.
* fix horrible named-docs-disappearing bug :-)Isaac Dupree2009-08-231-5/+16
|
* Move doc parsing/lexing into Haddock for ghc>=6.11Isaac Dupree2009-08-231-46/+94
|
* Cross-Package Documentation version 4Isaac Dupree2009-08-121-9/+40
|
* Fix unused import warningsIan Lynagh2009-07-071-4/+0
|
* Add Haddock module headersDavid Waern2009-06-241-5/+10
| | | | | | | | | Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock@projects.haskell.org. Next step is to add a brief description to each module.
* Move H.GHC.Utils to H.GhcUtilsDavid Waern2009-04-051-1/+1
|
* hlint policeDavid Waern2009-04-011-3/+2
|
* hlint policeDavid Waern2009-04-011-7/+7
|
* -Wall police in H.I.CreateDavid Waern2009-03-281-79/+57
|
* Shorten warning messageDavid Waern2009-02-271-3/+2
|
* Fix error message conflictDavid Waern2009-02-271-5/+4
| | | | | | The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now.
* Bug fixDavid Waern2009-02-271-8/+10
| | | | | | | | | | | | | | | | | | We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates.
* Add the module to one of haddocks warningsIan Lynagh2009-02-261-1/+1
|
* Do not show a subordinate at the top level if its parent is also exportedDavid Waern2009-02-071-6/+44
| | | | See note in the source code for more info.
* Correct commentDavid Waern2009-01-241-2/+2
|
* Filter out separately exported associated types in a smarter wayDavid Waern2009-01-231-17/+19
|
* Fix Trac #50: do not attach docs to pragmas or other kinds of non-declarationsDavid Waern2009-01-221-12/+10
| | | | | We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations.
* Fix Trac #59: TH-generated declarations disappearingDavid Waern2009-01-201-7/+1
| | | | This patch was contributed by Joachim Breitner (nomeata).
* Document H.I.Create.collectDocs betterDavid Waern2009-01-201-1/+4
|
* Export modules also when coming from external packagesDavid Waern2009-01-081-4/+15
| | | | | This seems to have regressed since a refactoring that was part of the 2.3.0 release.
* Show re-exported names from external packages againDavid Waern2009-01-021-9/+36
| | | | | | | This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files.
* Make visible names from ExportItemsDavid Waern2008-12-081-58/+18
| | | | | | | | | | | | | | Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment.
* Make named doc comments into ExportDoc instead of ExportDeclDavid Waern2008-10-271-0/+1
| | | | | Fixes a crash when processing modules without export lists containing named docs.
* Tidy up code in H.I.Create a littleDavid Waern2008-10-221-38/+3
| | | | | Remove commented out half-done type instance support, and remove DeclWithDoc synonym.
* Remove subordinate map and its usageDavid Waern2008-10-221-21/+17
| | | | It is not needed now that we store subordinate names in the DeclInfo map.
* Document function and improve its layoutDavid Waern2008-10-161-5/+4
|
* Fix #61David Waern2008-10-161-38/+49
| | | | | | | | | | | | | | | | | | | We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup.
* Add subordinates with docs to the declaration mapDavid Waern2008-10-151-10/+12
| | | | | | | | | | | The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate.
* Move convenient type synonym to H.TypesDavid Waern2008-10-151-5/+0
|
* Comment out unused type family stuff completelyDavid Waern2008-10-151-7/+6
|
* Use type synonyms for declarations and docs in H.I.CreateDavid Waern2008-10-151-13/+19
|