| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Fix bug in renameExportItems that meant links in instances weren't
being renamed properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
copyright update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
support for i-parameters + zip comprehensions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Update to avoid using hslibs with GHC >= 5.04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An 80% solution to generating derived instances. A complete solution
would duplicate the instance inference logic, but if a type variable
occurs as a constructor argument, then we can just propagate the derived
class to the variable. But we know nothing of the constraints on any
type variables that occur elsewhere. For example, the declarations
data Either a b = Left a | Right b deriving (Eq, Ord)
data Ptr a = Ptr Addr# deriving (Eq, Ord)
newtype IORef a = IORef (STRef RealWorld a) deriving Eq
yield the instances
(Eq a, Eq b) => Eq (Either a b)
(Ord a, Ord b) => Ord (Either a b)
Eq (Ptr a)
Ord (Ptr a)
(??? a) => Eq (IORef a)
The last example shows the limits of this local analysis.
Note that a type variable may be in both categories: then we know a
constraint, but there may be more, or a stronger constraint, e.g.
data Tree a = Node a [Tree a] deriving Eq
yields
(Eq a, ??? a) => Eq (Tree a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Patches to quieten ghc -Wall, from those nice folks at Galois.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Rename the module documentation properly (bug reported by Sven Panne).
|
|
|
|
| |
Fix bug: we weren't renaming HsDocCommentNamed in renameDecl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
| |
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
|