aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockHtml.hs
Commit message (Collapse)AuthorAgeFilesLines
* Add a --wiki=URL flag to add a per-module link to a correspondng wiki page.Duncan Coutts2006-01-171-12/+30
| | | | | | | | So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option.
* [haddock @ 2005-03-01 17:16:40 by simonmar]simonmar2005-03-011-30/+48
| | | | | | Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case).
* [haddock @ 2005-02-28 16:22:08 by simonmar]simonmar2005-02-281-19/+20
| | | | | | | | | | | | | | | Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results.
* [haddock @ 2005-02-02 16:23:00 by simonmar]simonmar2005-02-021-13/+18
| | | | | | | | | | | | | | | | | | | | | | Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning.
* [haddock @ 2005-01-16 15:41:21 by panne]panne2005-01-161-20/+17
| | | | Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway.
* [haddock @ 2005-01-16 12:58:03 by panne]panne2005-01-161-1/+1
| | | | | Correctly handle the new order of arguments for the combining function given to fromListWith.
* [haddock @ 2005-01-15 18:44:45 by panne]panne2005-01-151-14/+10
| | | | | | | | | | Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later.
* [haddock @ 2004-09-24 07:04:38 by panne]panne2004-09-241-7/+12
| | | | | | | | Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable.
* [haddock @ 2004-08-09 11:55:05 by simonmar]simonmar2004-08-091-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger@informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header.
* [haddock @ 2004-08-03 21:07:58 by panne]panne2004-08-031-6/+7
| | | | Improved spacing of dynamic module tree
* [haddock @ 2004-08-03 19:45:11 by sof]sof2004-08-031-1/+4
| | | | make it compile with <= ghc-6.1
* [haddock @ 2004-08-03 19:44:03 by panne]panne2004-08-031-14/+22
| | | | | | | | | | Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before)
* [haddock @ 2004-08-02 21:12:25 by panne]panne2004-08-021-8/+7
| | | | Use pathJoin instead of low-level list-based manipulation for FilePaths
* [haddock @ 2004-08-02 20:32:28 by panne]panne2004-08-021-4/+4
| | | | Nuked dead code
* [haddock @ 2004-08-02 20:02:29 by panne]panne2004-08-021-1/+1
| | | | | Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays...
* [haddock @ 2004-08-02 16:25:53 by krasimir]krasimir2004-08-021-2/+2
| | | | | Add root node to the table of contents. All modules in tree are not children of the root
* [haddock @ 2004-08-01 19:52:06 by krasimir]krasimir2004-08-011-14/+11
| | | | fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format.
* [haddock @ 2004-07-31 20:35:21 by krasimir]krasimir2004-07-311-4/+6
| | | | Added support for DevHelp
* [haddock @ 2004-07-31 14:53:28 by krasimir]krasimir2004-07-311-2/+4
| | | | HtmlHelp 1.x
* [haddock @ 2004-07-31 13:10:20 by krasimir]krasimir2004-07-311-4/+4
| | | | Make DHtmlTree compatible with Mozila browser
* [haddock @ 2004-07-31 12:04:37 by krasimir]krasimir2004-07-311-2/+2
| | | | | make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful.
* [haddock @ 2004-07-30 22:15:45 by krasimir]krasimir2004-07-301-62/+123
| | | | | | | | more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug
* [haddock @ 2004-07-28 22:12:09 by krasimir]krasimir2004-07-281-11/+1
| | | | | bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs
* [haddock @ 2004-07-27 22:58:23 by krasimir]krasimir2004-07-271-55/+39
| | | | Add basic support for Microsoft HTML Help 2.0
* [haddock @ 2004-07-13 17:59:28 by panne]panne2004-07-131-2/+7
| | | | | A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there.
* [haddock @ 2004-07-01 11:08:57 by simonmar]simonmar2004-07-011-3/+4
| | | | | | Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead.
* [haddock @ 2004-03-27 12:52:34 by panne]panne2004-03-271-1/+1
| | | | Add a doctype for the contents page, too.
* [haddock @ 2004-03-27 10:32:20 by panne]panne2004-03-271-1/+1
| | | | "type" is a required attribute of the "script" element
* [haddock @ 2004-03-25 16:00:36 by simonmar]simonmar2004-03-251-4/+4
| | | | Remove all that indentation in the generated HTML to keep the file sizes down.
* [haddock @ 2004-03-25 15:17:23 by simonmar]simonmar2004-03-251-17/+44
| | | | | | | | | | Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment.
* [haddock @ 2004-02-03 11:02:03 by simonmar]simonmar2004-02-031-1/+1
| | | | Fix bug in index generation
* [haddock @ 2003-11-28 12:09:58 by simonmar]simonmar2003-11-281-10/+18
| | | | | | Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it.
* [haddock @ 2003-11-11 12:10:44 by simonmar]simonmar2003-11-111-5/+4
| | | | | | | | | Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't.
* [haddock @ 2003-11-10 16:15:18 by simonmar]simonmar2003-11-101-1/+1
| | | | copyright update
* [haddock @ 2003-11-10 14:41:05 by simonmar]simonmar2003-11-101-5/+9
| | | | | | | | | | | | | | | | | | | | | Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list.
* [haddock @ 2003-11-06 16:48:11 by simonmar]simonmar2003-11-061-20/+33
| | | | | | | | | - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page.
* [haddock @ 2003-11-06 14:47:36 by simonmar]simonmar2003-11-061-10/+0
| | | | | Remove the 'Parent' button - it is of dubious use, and often points into thin air.
* [haddock @ 2003-11-06 12:39:46 by simonmar]simonmar2003-11-061-28/+53
| | | | | | | | | | | | | | | | | | | | | - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo@. -- -- [@bar@] The description of @bar@. Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added.
* [haddock @ 2003-11-05 17:16:04 by simonmar]simonmar2003-11-051-33/+43
| | | | | | | | | | | | | Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up.
* [haddock @ 2003-11-05 15:15:59 by simonmar]simonmar2003-11-051-56/+74
| | | | | | | | | | | | | | | | | | | | | | | | Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this.
* [haddock @ 2003-11-05 12:30:28 by simonmar]simonmar2003-11-051-6/+6
| | | | | | | | | | | - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there.
* [haddock @ 2003-10-20 17:19:22 by sof]sof2003-10-201-13/+23
| | | | support for i-parameters + zip comprehensions
* [haddock @ 2003-08-05 14:10:31 by simonmar]simonmar2003-08-051-1/+1
| | | | | | I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it.
* [haddock @ 2003-08-04 10:18:24 by panne]panne2003-08-041-1/+2
| | | | Don't print parentheses around one-element contexts
* [haddock @ 2003-07-30 16:05:40 by simonmar]simonmar2003-07-301-53/+34
| | | | | | | | | | | | | | | Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup.
* [haddock @ 2003-07-28 14:32:42 by simonmar]simonmar2003-07-281-1/+7
| | | | Update to avoid using hslibs with GHC >= 5.04
* [haddock @ 2003-07-28 13:33:03 by simonmar]simonmar2003-07-281-4/+10
| | | | | Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively).
* [haddock @ 2003-06-03 09:55:26 by simonmar]simonmar2003-06-031-1/+4
| | | | | | Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems.
* [haddock @ 2003-05-21 15:07:21 by simonmar]simonmar2003-05-211-2/+2
| | | | Only omit the module contents when there are no section headings at all.
* [haddock @ 2003-05-06 10:14:52 by simonmar]simonmar2003-05-061-1/+2
| | | | | Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code.