| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Add support for a "prologue" - a description for the whole library,
placed on the contents page before the module list.
|
|
|
|
|
|
|
| |
Tiny workaround for the fact that Haddock currently ignores
HsImportSpecs: Let the local_orig_env take precedence.
This is no real solution at all, but improves things sometimes,
e.g. in my GLUT documentation. :-)
|
|
|
|
|
| |
Keep foreign imports when there is no export list (bug reported by
Sven Panne).
|
|
|
|
| |
Fix for exporting record selectors from a newtype declaration
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
Only link to names in the current module which are actually listed in
the documentation. A name may be exported but not present in the
documentation if it is exported as part of a 'module M' export
specifier.
|
|
|
|
| |
Rename the module documentation properly (bug reported by Sven Panne).
|
|
|
|
| |
warning message tweak
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Print the module name in a doc-string parse error
|
|
|
|
|
|
|
|
|
|
| |
The last commit to Main.lhs broke the delicate balance of laziness
which was being used to avoid computing the dependency graph of
modules.
So I finally bit the bullet and did a proper topological sort of the
module graph, which turned out to be easy (stealing the Digraph module
from GHC - this really ought to be in the libraries somewhere).
|
|
|
|
| |
Add support for existential quantifiers on constructors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fix silly bug in named documentation block lookup.
|
|
|
|
| |
Allow '-- |' style annotations on constructors and record fields.
|
|
|
|
|
|
|
| |
- support for fundeps (partially contributed by Brett Letner - thanks
Brett).
- make it build with GHC 4.08.2
|
|
|
|
|
|
|
| |
- Add support for named chunks of documentation which can be
referenced from the export list.
- Copy the icon from $libdir to the destination in HTML mode.
|
|
|
|
|
|
|
| |
Grok the kind of module headers we use in fptools/libraries, and pass
the "portability", "stability", and "maintainer" strings through into
the generated HTML. If the module header doesn't match the pattern,
then we don't include the info in the HTML.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- copy haddock.css into the same place as the generated HTML
- new option: --css <file> specifies the style sheet to use
- new option: -o <dir> specifies the directory in which to
generate the output.
- because Haddock now needs to know where to find its default stylesheet,
we have to have a wrapper script and do the haddock-inplace thing
(Makefile code copied largely from fptools/happy).
|
|
|
|
|
|
| |
Parse errors in doc strings are now reported as warnings rather that
causing the whole thing to fall over. It still needs cleaning up (the
warning is emitted with trace) but this will do for the time being.
|
|
|
|
|
| |
Generate a little table of contents at the top of the module doc (only
if the module actually contains some section headings, though).
|
|
|
|
|
|
|
|
|
| |
Lots of changes, including:
- add index support to the HTML backend
- clean up the renamer, put it into a monad
- propogate unresolved names to the top level and report them in a nicer way
- various bugfixes
|
|
|
|
| |
Fix a problem with exports of the form T(..).
|
|
|
|
|
|
|
|
|
|
|
| |
Remap names in the exported declarations to be "closer" to the current
module. eg. if an exported declaration mentions a type 'T' which is
imported from module A then re-exported from the current module, then
links from the type or indeed the documentation will point to the
current module rather than module A.
This is to support better hiding: module A won't be referred to in the
generated output.
|
|
This is Haddock, my stab at a Haskell documentation tool. It's not
quite ready for release yet, but I'm putting it in the repository so
others can take a look.
It uses a locally modified version of the hssource parser, extended
with support for GHC extensions and documentation annotations.
|