aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/AttachInstances.hs
Commit message (Collapse)AuthorAgeFilesLines
* Add support for type-level literals.Iavor S. Diatchki2012-03-151-1/+4
|
* Follow rename of Instance to ClsInst in GHCIan Lynagh2012-01-031-1/+1
|
* Go back to having a doc, sub and decl map instead of one big decl map.David Waern2011-12-271-6/+3
| | | | | | | | | This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer.
* Remove #ifs for older compiler versions.David Waern2011-11-251-4/+0
|
* Adapt Haddock for the ConstraintKind extension changesMax Bolingbroke2011-09-061-2/+0
|
* Add git commits since switchover:David Waern2011-06-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower@hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo@earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm@cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo@earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC
* follow changes in the GHC APISimon Marlow2010-10-271-2/+9
|
* Fix a bug in attachInstancesDavid Waern2010-07-041-18/+39
| | | | | | | We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however.
* Position the module header the same way everywhereDavid Waern2010-05-131-1/+0
| | | | Silly, but nice with some consistency :-)
* Rename HsDoc back into DocDavid Waern2009-11-281-1/+1
|
* Remove cruft due to compatibility with older GHCsDavid Waern2009-11-281-6/+0
|
* Remove Name from DocInstanceDavid Waern2009-11-281-1/+1
| | | | It's not used.
* Comments on instancesDavid Waern2009-11-241-12/+31
| | | | | | | | | | | | | | | 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
* Move toHsInstHead to Haddock.Convert and call it synifyInstHeadDavid Waern2009-09-061-10/+1
|
* Style policeDavid Waern2009-09-061-0/+1
|
* Add more copyright owners to H.I.AttachInstancesDavid Waern2009-09-061-1/+3
|
* re-implement function-argument docsIsaac Dupree2009-08-231-2/+3
| | | | | | | ..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 preprocessor conditional senseIsaac Dupree2009-08-171-1/+1
|
* Find instances using GHC, which is more complete.Isaac Dupree2009-08-181-38/+23
| | | | | | | | | | | In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?)
* switch AttachInstances to use synify codeIsaac Dupree2009-08-181-37/+6
| | | | | | | | It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication!
* Fix unused import warningsIan Lynagh2009-07-071-2/+0
|
* Add Haddock module headersDavid Waern2009-06-241-8/+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.
* hlint policeDavid Waern2009-04-011-3/+3
|
* hlint policeDavid Waern2009-04-011-1/+1
|
* -Wall police in H.I.AttachInstancesDavid Waern2009-03-281-13/+16
|
* Hide fynTyConName only for recent GHC versionsDavid Waern2009-02-251-0/+6
|
* Hide funTyConName, now exported by TypeRepsimonpj2009-02-021-1/+1
|
* Fix #61David Waern2008-10-161-2/+2
| | | | | | | | | | | | | | | | | | | 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.
* Remove matching on NoteTy in AttachInstances, it has been removedDavid Waern2008-08-121-3/+1
|
* Support type equality predicatesDavid Waern2008-07-281-0/+1
|
* Preparation for rendering instances as separate declarationsDavid Waern2008-07-201-5/+6
| | | | | | | | | 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.
* Remove filtering of instancesDavid Waern2008-07-071-2/+2
| | | | | | | We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later.
* Add LANGUAGE pragmas to source filesDavid Waern2008-05-011-0/+3
|
* Change the representation of DocNamesDavid Waern2008-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Handle infix operators correctly in the Type -> HsType translationDavid Waern2007-12-081-3/+8
|
* WibbleDavid Waern2007-11-061-1/+1
|
* Filter out instances with TyCons that are not exportedDavid Waern2007-11-061-6/+16
|
* Rename HaddockModule to InterfaceDavid Waern2007-08-301-3/+3
|
* Add some modules that I forgot to add earlierDavid Waern2007-08-291-0/+134