| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
commented-out debugging code
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
More bugfixes to the export handling
|
|
|
|
|
|
|
| |
Clean up the code that constructs the exported declarations, and fix a
couple of bugs along the way. Now if you import a class hiding one of
the methods, then re-export the class, the version in the
documentation will correctly have the appropriate method removed.
|
|
|
|
|
|
| |
Handle import specs properly, include 'hiding'. Haddock now has a
complete implementation of the Haskell module system (more or less; I
won't claim it's 100% correct).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Make it compile with newer GHCs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for reading and writing interface files(!)
This turned out to be quite easy, and necessary to get decent
hyperlinks between the documentation for separate packages in the
libraries.
The functionality isn't quite complete yet: for a given package of
modules, you'd like to say "the HTML for these modules lives in
directory <dir>" (currently they are assumed to be all in the same
place).
Two new flags:
--dump-interface=FILE dump an interface file in FILE
--read-interface=FILE read interface from FILE
an interface file describes *all* the modules being processed. Only
the exported names are kept in the interface: if you re-export a name
from a module in another interface the signature won't be copied.
This is a compromise to keep the size of the interfaces sensible.
Also, I added another useful option:
--no-implicit-prelude
avoids trying to import the Prelude. Previously this was the default,
but now importing the Prelude from elsewhere makes sense if you also
read in an interface containing the Prelude module, so Haddock imports
the Prelude implicitly according to the Haskell spec.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Add support for a "prologue" - a description for the whole library,
placed on the contents page before the module list.
|
|
|
|
| |
Empty declaration fixes.
|
|
|
|
| |
portability nit
|
|
|
|
|
|
|
| |
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. :-)
|
|
|
|
|
| |
Identifiers in single quotes can be symbol names too (bug reported by
Hal Daume).
|
|
|
|
|
| |
Keep foreign imports when there is no export list (bug reported by
Sven Panne).
|
|
|
|
| |
Render class names as proper binders
|
|
|
|
| |
Fix for exporting record selectors from a newtype declaration
|
|
|
|
|
| |
Fix linking to qualified names again (thanks to Sven Panne for
pointing out the bug).
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Include the instances in abstract data types too
|
|
|
|
|
|
|
|
|
|
|
| |
Make the markup syntax a little more friendly:
- single quotes are now interpreted literally unless they surround a
valid Haskell identifier. So for example now there's no need to
escape a single quote used as an apostrophe.
- text to the right of a bird track is now literal (if you want
marked-up text in a code block, use @...@).
|
|
|
|
| |
Back out previous change until we can find a better way to do this.
|
|
|
|
|
|
|
|
|
| |
Handle lone occurrences of '/', e.g.,
-- | This/that.
[did this in the lexer rather than in the parser, as I couldn't
see a way not to introduce an S/R conflict that way.]
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
If an identifier doesn't lex, then just replace it by a DocString.
|
|
|
|
| |
Rename the module documentation properly (bug reported by Sven Panne).
|
|
|
|
|
| |
Do something sensible for modules which don't export anything (except
instances).
|
|
|
|
| |
hyperlinked identifiers should be in <tt>
|
|
|
|
| |
warning message tweak
|
|
|
|
| |
Fix some bugs in the rendering of qualified type signatures.
|
|
|
|
| |
Fix bug: we weren't renaming HsDocCommentNamed in renameDecl
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
- Use an alternate tabular layout for datatypes, which is more compact
- Fix some problems with the function argument documentation
|
|
|
|
| |
Fix bugs in qualified name handling (A.B.f was returned as B.f)
|
|
|
|
| |
Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Preserve the newline before a bird-track, but only within a paragraph.
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
Allow backquote as the right-hand quote as well as the left-hand
quote, as suggested by Dean Herrington.
Clean up the grammar a litte.
|
|
|
|
| |
Only include a mini-contents if there are 2 or more sections
|
|
|
|
| |
Add dependency
|
|
|
|
| |
Print the module name in a doc-string parse error
|
|
|
|
| |
Add 'stdcall' keyword
|
|
|
|
| |
Type synonyms can accept a ctype on the RHS, to match GHC.
|
|
|
|
| |
Add a special case for list types in ppHsAType
|
|
|
|
|
| |
Don't consider a module re-export as having documentation, for the
purposes of deciding whether we need a Synopsis section or not.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Give a more useful instance of Show for Module.
|
|
|
|
| |
Fix buglet
|