aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
Commit message (Collapse)AuthorAgeFilesLines
* Add markup support for interactive examplessimon.hengel2010-04-021-0/+1
|
* Rename HsDoc back into DocDavid Waern2009-11-281-3/+3
|
* Remove cruft due to compatibility with older GHCsDavid Waern2009-11-281-15/+1
|
* Remove Name from DocInstanceDavid Waern2009-11-281-3/+2
| | | | It's not used.
* Comments on instancesDavid Waern2009-11-241-3/+12
| | | | | | | | | | | | | | | 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
* Haddock.Interface.Rename: eliminate warningsIsaac Dupree2009-08-231-1/+2
|
* re-implement function-argument docsIsaac Dupree2009-08-231-5/+16
| | | | | | | ..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.
* Move doc parsing/lexing into Haddock for ghc>=6.11Isaac Dupree2009-08-231-3/+10
|
* follow changes in GHC's ForeignTypeSimon Marlow2009-07-281-0/+6
|
* Fix unused import warningsIan Lynagh2009-07-071-1/+0
|
* Resolve conflictsIan Lynagh2009-07-051-1/+2
|
* Follow extra field in ConDeclsimonpj2009-07-021-2/+4
|
* Remove misplaced whitespace in H.I.RenameDavid Waern2009-06-271-42/+42
|
* 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-5/+5
|
* -Wall police in H.I.RenameDavid Waern2009-03-281-38/+49
|
* Define Foldable and Traversable instances for LocatedDavid Waern2009-03-271-2/+6
|
* Remove H.DocName and put DocName in H.TypesDavid Waern2009-03-271-1/+0
|
* Do not show package name in warning messageDavid Waern2009-02-281-1/+1
|
* Show re-exported names from external packages againDavid Waern2009-01-021-3/+3
| | | | | | | 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-1/+1
| | | | | | | | | | | | | | 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 renamer consistentDavid Waern2008-10-201-9/+12
| | | | | Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name).
* Fix #61David Waern2008-10-161-4/+12
| | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | 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.
* WibbleDavid Waern2008-10-151-1/+1
|
* Add support for DocPicDavid Waern2008-10-101-0/+1
| | | | | | The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix!
* Preparation for rendering instances as separate declarationsDavid Waern2008-07-201-4/+13
| | | | | | | | | We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet.
* Refactoring in H.Interface.CreateDavid Waern2008-07-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names).
* Rename associated typesDavid Waern2008-06-301-5/+7
|
* Rename type patternsDavid Waern2008-06-301-5/+9
|
* Rename TyFamilyDavid Waern2008-06-301-3/+8
|
* Rename ForeignTypeDavid Waern2008-06-301-4/+3
|
* Add a flag for turning off all warningsDavid Waern2008-04-111-6/+6
|
* Change the representation of DocNamesDavid Waern2008-02-091-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented.
* addition of type equality support (at least for HTML generation)Wolfgang Jeltsch2007-12-031-0/+4
|
* Manual merge of a patch from Duncan Coutts that removes the dependency on mtl David Waern2007-11-111-1/+0
|
* Complain if we can't link to wired-in namesDavid Waern2007-11-081-1/+1
|
* Remove OrdName stuffDavid Waern2007-11-081-24/+1
|
* Remove commented-out codeDavid Waern2007-11-081-14/+1
|
* Don't warn about not being able to link to wired/system/builtin-namesDavid Waern2007-11-051-2/+3
|
* WibbleDavid Waern2007-10-211-0/+6
|
* FIX: Ord for OrdName was not comparing modulesDavid Waern2007-10-211-5/+14
|
* Rename HaddockModule to InterfaceDavid Waern2007-08-301-10/+10
|
* Add some modules that I forgot to add earlierDavid Waern2007-08-291-0/+404