aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockHtml.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* [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.
* [haddock @ 2003-03-10 21:34:24 by panne]panne2003-03-101-17/+28
| | | | Escape fragments. This fixes e.g. links to operators.
* [haddock @ 2003-03-09 21:13:43 by panne]panne2003-03-091-7/+10
| | | | | Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor.
* [haddock @ 2003-02-20 21:31:40 by panne]panne2003-02-201-8/+14
| | | | | * Add varsyms and consyms to index * Exclude empty entries from index
* [haddock @ 2002-08-02 09:25:20 by simonmar]simonmar2002-08-021-3/+17
| | | | | | | Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen).
* [haddock @ 2002-07-25 14:37:28 by simonmar]simonmar2002-07-251-3/+5
| | | | | | | | | | | | | | | | Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now.
* [haddock @ 2002-07-24 09:42:17 by simonmar]simonmar2002-07-241-150/+209
| | | | Patches to quieten ghc -Wall, from those nice folks at Galois.
* [haddock @ 2002-07-19 09:59:02 by simonmar]simonmar2002-07-191-2/+2
| | | | Allow special id's ([], (), etc.) to be used in an import declarations.
* [haddock @ 2002-07-10 10:26:11 by simonmar]simonmar2002-07-101-3/+10
| | | | | Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help).
* [haddock @ 2002-07-10 09:40:56 by simonmar]simonmar2002-07-101-1/+3
| | | | Fix for rendering of the (->) type constructor, from Ross Paterson.
* [haddock @ 2002-07-09 16:33:31 by krasimir]krasimir2002-07-091-26/+4
| | | | 'Microsoft HTML Help' support
* [haddock @ 2002-07-09 10:12:10 by simonmar]simonmar2002-07-091-2/+2
| | | | | | Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base).
* [haddock @ 2002-06-24 14:37:42 by simonmar]simonmar2002-06-241-42/+26
| | | | | | | | | | | | | | When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface.
* [haddock @ 2002-06-21 12:43:06 by simonmar]simonmar2002-06-211-0/+1
| | | | | | When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers.
* [haddock @ 2002-06-20 12:39:01 by simonmar]simonmar2002-06-201-4/+14
| | | | | Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list.
* [haddock @ 2002-06-11 09:23:25 by simonmar]simonmar2002-06-111-0/+3
| | | | portability nit
* [haddock @ 2002-06-03 14:12:38 by simonmar]simonmar2002-06-031-11/+13
| | | | Render class names as proper binders
* [haddock @ 2002-06-03 13:05:57 by simonmar]simonmar2002-06-031-17/+24
| | | | | | | Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case).
* [haddock @ 2002-05-29 15:27:18 by simonmar]simonmar2002-05-291-10/+8
| | | | Include the instances in abstract data types too
* [haddock @ 2002-05-27 15:56:45 by simonmar]simonmar2002-05-271-3/+2
| | | | | Do something sensible for modules which don't export anything (except instances).
* [haddock @ 2002-05-27 14:53:53 by simonmar]simonmar2002-05-271-1/+1
| | | | hyperlinked identifiers should be in <tt>
* [haddock @ 2002-05-27 14:10:27 by simonmar]simonmar2002-05-271-27/+32
| | | | Fix some bugs in the rendering of qualified type signatures.
* [haddock @ 2002-05-27 12:30:37 by simonmar]simonmar2002-05-271-5/+5
| | | | | | | | | - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more.
* [haddock @ 2002-05-27 09:03:51 by simonmar]simonmar2002-05-271-104/+153
| | | | | | | | | | | | | | Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others)
* [haddock @ 2002-05-21 10:24:52 by simonmar]simonmar2002-05-211-45/+79
| | | | | - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation
* [haddock @ 2002-05-15 13:03:01 by simonmar]simonmar2002-05-151-89/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed.
* [haddock @ 2002-05-13 15:19:03 by simonmar]simonmar2002-05-131-2/+9
| | | | | | | Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs).
* [haddock @ 2002-05-10 16:05:08 by simonmar]simonmar2002-05-101-3/+3
| | | | Only include a mini-contents if there are 2 or more sections
* [haddock @ 2002-05-09 11:10:55 by simonmar]simonmar2002-05-091-6/+8
| | | | Add a special case for list types in ppHsAType
* [haddock @ 2002-05-09 10:44:15 by simonmar]simonmar2002-05-091-0/+1
| | | | | Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not.
* [haddock @ 2002-05-08 14:48:39 by simonmar]simonmar2002-05-081-10/+20
| | | | Add support for existential quantifiers on constructors.
* [haddock @ 2002-05-08 11:21:56 by simonmar]simonmar2002-05-081-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak@cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace.
* [haddock @ 2002-04-29 15:55:46 by simonmar]simonmar2002-04-291-2/+2
| | | | remove a trace
* [haddock @ 2002-04-29 15:28:54 by simonmar]simonmar2002-04-291-11/+17
| | | | Allow '-- |' style annotations on constructors and record fields.