| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Due to the use of pattern guards in Haddock, GHC was called with
-fglasgow-exts. This in turn enables bang patterns, too, which broke the
Haddock build. Removing some unnecessary pattern guards seemed to be the
better way of fixing this instead of using a pragma to disable pattern
guards.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now
use three seperate command line flags for the top level, per-module and
per-entity source and wiki links. They are:
--source-base, --source-module, --source-entity
--comments-base, --comments-module, --comments-entity
We leave -s, --source as an alias for --source-module which is how that option
behaved previously.
The long forms of the substitutions are still available, ${FILE} ${MODULE} etc
and the only non-trivial substitution is ${MODULE/./c} to replace the '.'
characters in the module name with any other character c. eg ${MODULE/./-}
Seperating the source and wiki url flags has the added bonus that they can
be turned on or off individually. So users can have per-module links for
example without having to also have per-entity links.`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like the wiki link on the contents and index page, add a source code link too.
Extend the wiki & source URL variable expansion syntax.
The original syntax was:
%F for the source file name (the .hs version only, not the .lhs or .hs.pp one)
%M for the module name (with '.' replaced by '/')
The new syntax is:
%F or %{FILE} for the original source file name
%M or %{MODULE} for the module name (no replacements)
%N or %{NAME} for the function/type export name
%K or %{KIND} for a type/value flag "t" or "v"
with these extensions:
%{MODULE/./c} to replace the '.' module seperator with any other char c
%{VAR|some text with the % char in it} which means if the VAR is not in use in
this URL context then "" else replace the given text with the '%' char
replaced by the string value of the VAR. This extension allows us to construct
URLs wit optional parts, since the module/file name is not available for the
URL in the contents/index pages and the value/type name is not available for
the URL at the top level of each module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Another attempt at lining up the package names on the contents page.
Now, they line up with Konqueror, and almost line up with Firefox & IE
(different layout in each case).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempt to fix the layout of the package names in the contents.
Having tried just about everything, the only thing I can get to work
reliably is to make the package names line up on a fixed offset from
the left margin. This obviously isn't ideal, so anyone else that
would like to have a go at improving it is welcome. One option is to
remove the +/- buttons from the contents list and go back to a plain
table.
The contents page now uses CSS for layout rather than tables. It
seems that most browsers have different interpretations of CSS layout,
so only the simplest things lead to consistent results.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Switched the default state for instances and the module hierarchy to
non-collapsed. This can be reversed when we finally use cookies from
JavaScript to have a more persistent state. Previously going back and forth
in the documentation was simply too annoying because everything was
collapsed again and therefore the documentation was not easily navigatable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Improved spacing of dynamic module tree
|
|
|
|
| |
make it compile with <= ghc-6.1
|
|
|
|
|
|
|
|
|
|
| |
Pacify W3C validator:
* Added document encoding (currently UTF-8, not sure if this is completely correct)
* Fixed syntax of `id' attributes
* Added necessary `alt' attribute for +/- images
Small layout improvement:
* Added space after +/- images (still not perfect, but better than before)
|
|
|
|
| |
Use pathJoin instead of low-level list-based manipulation for FilePaths
|
|
|
|
| |
Nuked dead code
|
|
|
|
|
| |
Fixed -o/--odir handling. Generating the output, especially the
directory handling, is getting a bit convoluted nowadays...
|
|
|
|
|
| |
Add root node to the table of contents. All modules in tree are not children of
the root
|
|
|
|
| |
fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format.
|
|
|
|
| |
Added support for DevHelp
|
|
|
|
| |
HtmlHelp 1.x
|
|
|
|
| |
Make DHtmlTree compatible with Mozila browser
|
|
|
|
|
| |
make the DHtmlTree in contents page more portable. The +/- buttons are replaced
with new images which looks more beatiful.
|
|
|
|
|
|
|
|
| |
more stuffs
- support for separated compilation of packages
- the contents page now uses DHTML TreeView
- fixed copyFile bug
|
|
|
|
|
| |
bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to
HaddockUtil.hs module to make them accessible from HaddockHH2.hs
|
|
|
|
| |
Add basic support for Microsoft HTML Help 2.0
|
|
|
|
|
| |
A quote is a valid part of a Haskell identifier, but it would interfere with an
ECMA script string delimiter, so escape it there.
|
|
|
|
|
|
| |
Update to the +/- buttons: use a resized image rather than a <button>.
Still seeing some strange effects in Konqueror, so might need to use a
fixed-size image instead.
|
|
|
|
| |
Add a doctype for the contents page, too.
|
|
|
|
| |
"type" is a required attribute of the "script" element
|
|
|
|
| |
Remove all that indentation in the generated HTML to keep the file sizes down.
|
|
|
|
|
|
|
|
|
|
| |
Add support for collaspible parts of the page, with a +/- button and a
bit of JavaScript. Make the instances collapsible, and collapse them
by default.
This makes documentation with long lists of instances (eg. the
Prelude) much easier to read. Maybe we should give other
documentation sections the same treatment.
|
|
|
|
| |
Fix bug in index generation
|
|
|
|
|
|
| |
Fix some of the problems with Haddock generating pages that are too
wide. Now we only specify 'nowrap' when it is necessary to avoid a
code box getting squashed up by the text to the right of it.
|
|
|
|
|
|
|
|
|
| |
Go back to producing just the documentation section, rather than just
the synopsis section, for a module with no documentation annotations.
One reason is that the synopsis section tries to link each entity to
its documentation on the same page. Also, the doc section anchors
each entity, and it lists instances which the synopsis doesn't.
|
|
|
|
| |
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.
|