| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's
source location tracking to include the file name as well as line/column. This
way each AST item that is tagged with a SrcLoc gets the original file name too.
Use this original file name to add source links to each exported item, in the
same visual style as the wiki links. Note that the per-export source links are
to the defining module rather than whichever module haddock pretends it is
exported from. This is what we want for source code links. The source code link
URL can also contain the name of the export so one could implement jumping to
the actual location of the function in the file if it were linked to an html
version of the source rather than just plain text. The name can be selected
with the %N wild card.
So for linking to the raw source code one might use:
--source=http://darcs/haskell.org/foo/%F
Or for linking to html syntax highlighted code:
--source=http://darcs/haskell.org/foo/%M.html#%N
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In each module, for each "top level" exported entity we add a hyper link to a
corresponding wiki page. The link url gets the name of the exported entity as
a '#'-style anchor, so if there is an anchor in the page with that name then
the users browser should jump directly to it. By "top level" we mean functions,
classes, class members and data types (data, type, newtype), but not data
constructors, class instances or data type class membership.
The link is added at the right of the page and in a small font. Hopefully this
is the right balance of visibility/distraction.
We also include a link to the wiki base url in the contents and index pages.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
extractRecSel: ignore non-record constructors (fixes a crash when
using datatypes with a mixture of record and non-record style
constructors).
|
|
|
|
| |
fix 3 bugs in --use-package, and document it.
|
|
|
|
|
|
|
| |
sort lists of instances by
- arity of the type constructors (so higher-kinded instances come first)
- name of the class
- argument types
|
|
|
|
|
|
| |
Add attribute #not-home, to indicate that the current module should
not be considered to be a home module for the each entity it exports,
unless there is no other module that exports the entity.
|
|
|
|
| |
fix typo for < 6.3
|
|
|
|
|
|
|
|
|
|
|
|
| |
- add --ignore-all-exports flag, which behaves as if every module
has the ignore-exports attribute (requested by Chris Ryder).
- add --hide option to hide a module on the command line.
- add --use-package option to get Haddock info for a package from
ghc-pkg (largely untested).
- remove reexports from the .haddock file, they aren't used any more.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
import Foreign/Foreign.C are required for Windows
|
|
|
|
| |
Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway.
|
|
|
|
| |
Added the last missing "flip" to get identical HTML output as previous versions.
|
|
|
|
| |
Data.Map.unions is left-biased.
|
|
|
|
|
| |
Correctly handle the new order of arguments for the combining function
given to fromListWith.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Remove string gap
|
|
|
|
|
|
|
|
| |
SGML is dead, long live DocBook XML!
Note: The BuildRequires tags in the spec files are still incomplete
and the documentation about the DocBook tools needs to be updated,
too. Stay tuned...
|
|
|
|
| |
Fixes to installation under Windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ffi wibble
|
|
|
|
| |
fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format.
|
|
|
|
| |
add missing imports
|
|
|
|
|
|
|
|
| |
more stuffs
- support for separated compilation of packages
- the contents page now uses DHTML TreeView
- fixed copyFile bug
|
|
|
|
| |
Add basic support for Microsoft HTML Help 2.0
|
|
|
|
| |
Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg.
|
|
|
|
|
| |
Complain if -h is used with --gen-index or --gen-contents, because
it'll overwrite the new index/contents.
|
|
|
|
|
|
|
| |
Make the handling of "deriving" slightly smarter, by ignoring data constructor
arguments that are identical to the lhs. Now handles things like
data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ...
|
|
|
|
|
|
| |
If a name is imported from two places, one hidden and one not, choose
the unhidden one to link to. Also, when there's only a hidden module
to link to, don't try linking to it.
|
|
|
|
| |
Fix duplicate instance bug
|
|
|
|
|
|
|
|
|
|
| |
mkExportItems fix & simplification: we should be looking at the actual
exported names (calculated earlier) to figure out which subordinates
of a declaration are exported.
This means that if you export a record, and name its fields separately
in the export list, the fields will still be visible in the
documentation for the constructor.
|
|
|
|
|
|
|
|
| |
getReExports was bogus: we should really look in the import_env to
find the documentation for an entity which we are re-exporting without
documentation.
Suggested by: Ross Paterson (patch modified by me).
|
|
|
|
| |
2002 -> 2003
|
|
|
|
| |
copyright update
|
|
|
|
| |
getReExports: one error case that isn't
|
|
|
|
|
| |
Fix for getReExports: take into account names which are not visible
because they are re-exported from a different package.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
| |
Include iface_reexported in the .haddock file. This unfortunately
bloats the file (40% for base). If this gets to be a problem we can
always apply the dictionary trick that GHC uses for squashing .hi
files.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
- Suppress warnings about unknown imported modules by default.
- Add a -v/--verbose flag to re-enable these warnings.
The general idea is to suppress the "Warning: unknown module: Prelude"
warnings which most Haddock users will see every time, and which
aren't terribly useful.
|
|
|
|
|
| |
Remove the last of the uses of 'trace' to emit warnings, and tidy up a
couple of places where duplicate warnings were being emitted.
|
|
|
|
| |
support for i-parameters + zip comprehensions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Made -D a short option for --dump-interface.
* Made -m a short option for --ms-help.
* Made -n a short option for --no-implicit-prelude.
* Made -c a short option for --css.
* Removed DocBook options from executable (they didn't do anything),
but mark them as reserved in the docs. Note that the short option
for DocBook output is now -S (from SGML) instead of -d. The latter
is now a short option for --debug.
* The order of the Options in the documentation now matches the order
printed by Haddock itself.
Note: Although changing the names of options is often a bad idea, I'd
really like to make the options for the programs in fptools more
consistent and compatible to the ones used in common GNU programs.
|
|
|
|
| |
Make it *very* clear that we terminate when given a -V/--version flag
|
|
|
|
|
|
|
|
|
| |
Made option handling a bit more consistent with other tools, in
particular: Every program in fptools should output
* version info on stdout and terminate successfully when -V or --version
* usage info on stdout and terminate successfully when -? or --help
* usage info on stderr and terminate unsuccessfully when an unknown option
is given.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Pay attention to import specs when building the the import env, as
well as the orig env. This may fix some wrong links in documentation
when import specs are being used.
|