Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rae/haddock
  • sjakobi/haddock
  • RyanGlScott/haddock
  • mynguyenbmc/haddock
  • kcsongor/haddock
  • wz1000/haddock
  • dten/haddock
  • bgamari/haddock
  • abrar/haddock
  • obsidiansystems/haddock
  • inaki/haddock
  • hsyl20/haddock
  • JoshMeredith/haddock
  • matheus23/haddock
  • Gertjan423/haddock
  • ulysses4ever/haddock
  • facundominguez/haddock
  • SuedeHead/haddock
  • Haskell-mouse/haddock
  • fgaz/haddock
  • arybczak/haddock
  • coot/haddock
  • hithroc/haddock
  • ani/haddock
  • supersven/haddock
  • alt-romes/haddock
  • sspencer/haddock
  • Joald/haddock
  • raehik/haddock
  • lexi.lambda/haddock
  • torsten.schmits/haddock
  • Bodigrim/haddock
  • doyougnu/haddock
  • barci2/haddock
  • Jade/haddock
  • wavewave/haddock
  • soulomoon/haddock
  • tvh/haddock
  • trac-sjoerd_visscher/haddock
  • Kleidukos/haddock
  • mmzk1526/haddock
  • stephenjudkins/haddock
  • KommuSoft1/haddock
43 results
Show changes
Commits on Source (1816)
{
"project.name" : "haddock",
"repository.callsign" : "HADDOCK",
"phabricator.uri" : "https://phabricator.haskell.org"
}
{
"linters": {
"filename": {
"type": "filename"
},
"generated": {
"type": "generated"
},
"merge-conflict": {
"type": "merge-conflict"
},
"nolint": {
"type": "nolint"
},
"haskell": {
"type": "text",
"include": ["(\\.(l?hs(-boot)?|x|y\\.pp)(\\.in)?$)"],
"severity": {
"5": "disabled",
"2": "warning"
}
}
}
}
:set --itest -idist/build -idist/build/autogen -packageghc -optP-include -optPdist/build/autogen/cabal_macros.h
/dist/
/haddock-api/dist/
/haddock-library/dist/
/html-test/out/
/hypsrc-test/out/
/latex-test/out/
/doc/haddock
/doc/haddock.ps
/doc/haddock.pdf
/doc/autom4te.cache/
/doc/config.log
/doc/config.mk
/doc/config.status
/doc/configure
tags
TAGS
.cabal-sandbox
cabal.sandbox.config
language: haskell
env:
# - GHCVER=7.8.2
# - GHCVER=7.8.3
- GHCVER=7.10.1
before_install:
- sudo add-apt-repository -y ppa:hvr/ghc
- sudo apt-get update
- sudo apt-get install ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
- sudo apt-get install cabal-install-1.22
- export PATH=/opt/cabal/1.22/bin:$PATH
- cabal --version
- cd haddock-library
- cabal install --only-dependencies --enable-tests
- cabal install doctest
# --ghc-options=-Werror
- cabal configure --enable-tests && cabal build && cabal test
- doctest -isrc -i$(echo vendor/attoparsec-*) -optP-include -optPdist/build/autogen/cabal_macros.h src/Documentation/Haddock/Parser.hs
- cabal install
- cd ..
- (cd haddock-api/ && cabal install --only-dependencies --enable-tests && cabal configure --enable-tests && cabal build && cabal test && cabal install)
script:
- cabal configure --enable-tests && cabal build && cabal test
Changes in version 2.16.2
* Generate hyperlinked source ourselves (#410, part of GSOC 2015)
* Fix expansion icon for user-collapsible sections (#412)
* Break up response file arguments on newlines
Changes in version 2.16.1
* Don't default to type constructors for out-of-scope names (#253 and
#375)
* Fix Hoogle display of constructors (#361)
* Fully qualify names in Hoogle instances output (#263)
* Output method documentation in Hoogle backend (#259)
* Don't print instance safety information in Hoogle (#168)
* Expand response files in arguments (#285)
* Build the main executable with -threaded (#399)
* Use SrcSpan of declarations for inferred type sigs (#207)
* Fix cross-module instance locations (#383)
* Fix alignment of Source link for instances in Firefox (#384)
Changes in version 2.16.0
* Experimental collapsible header support (#335)
* Add support for markdown links and images
* Allow an optional colon after the closing bracket of definition lists.
This is to disambiguate them from markdown links and will be require with a
future release.
* Fix re-exports of built-in type families (#310)
* Fix parsing of infix identifiers such as ``elem``.
* Print missing docs by default and add --no-print-missing-docs
* parser: now parses out some meta data too, breaking the API
* parser: markdown syntax for images and URLs is now accepted:
<<foo>> style for images and <foo bar> style for links is now
considered deprecated. <foo> for links is still OK.
* parser: add support for @since element: this is paragraph-level
element of the form ‘@since x.y.z’ where x.y.z is the version
number. The way it is rendered is subject to change.
* properly render package ID (not package key) in index (#329)
* links to source location of class instance definitions
* Fix code blocks in presence of Windows line endings
* Deal better with long synopsis lines (#151)
Changes in version 2.15.0
* Always read in prologue files as UTF8 (#286 and Cabal #1721)
* parser: don't wrap headers in DocParagraph (#307)
* parser: don't mangle append order for nested lists (pandoc #1346)
* parser: preserve list ordering in certain scenarios (#313)
* parser: update the attoparsec version used internally giving slight
parsing performance boost.
* Move development to be against latest GHC release and not GHC HEAD.
* Further split up the package to separate the executable from the
library, necessary by things like GHCJS. We now have
‘haddock-library’ which are the parts that don't use GHC API,
‘haddock-api’ which are (some of) the parts that do use GHC API and
‘haddock’ which merely provides the executable.
* Export few extra functions in the API.
* Add compatibility with GHC 7.8.2.
* Omit unnecessary ‘forall’s (#315 and #86)
* Remove some files which were really old or did not belong in the
repository in the first place.
Changes in version 2.14.3
* Fix parsing of identifiers with ^ or ⋆ in them (#298)
* Fix anchors (#308)
Changes in version 2.14.2
* Always drop --split-objs GHC flag for performance reasons (#292)
* Print kind signatures GADTs (#85)
* Drop single leading whitespace when reasonable from @-style blocks (#201)
* Fix crashes associated with exporting data family record selectors (#294)
Changes in version 2.14.1
* Render * and -> with their UnicodeSyntax equivalents if -U is enabled
* Display minimal complete definitions for type classes
* Hide right hand side of TF instances with hidden names on the RHS
Changes in version 2.14.0
* Print entities with missing documentation (#258)
* Print a warning message when given `-optghc` instead of `--optghc` (#5)
* Add `--compatible-interface-versions` (#231)
* Allow to generate latex documentation for FFI declarations (#247)
* Add copyright and license information to generated documentation
* Improved to Unicode support
* Bold markup support
* Nested paragraphs
* Better escaping
* Header markup
* Parser should no longer fail to parse any markup
* {-# OPTIONS_HADDOCK show-extensions #-} pragma will show the GHC extensions
enabled in the module.
* Properly render License field (#271)
* Print type/data family instances (for exported types only)
* Fix display of poly-kinded type operators (#189)
* PatternSynonyms support
* Fix display of implicit parameters (#260)
* Fix rendering of Contents when links are present (#276)
* Fix documentation duplication on record fields (#195)
* Add `--source-entity-line` for exact line links (eg. things defined
inside TH splices) (#79)
* Display fixity information for names with nonstandard fixities
* Bird tracks specified like "> code" no longer suffer from an extra leading
space in the code output
Changes in version 2.13.2
* Handle HsExplicitListTy in renamer (#213)
* Allow haddock markup in deprecation messages
* Export more types from Documentation.Haddock
* Include everything that is required to run the test suite with the cabal
package (#230)
Changes in version 2.13.1
* Hide instances that are "internal" to a module
* Add support for properties in documentation
* Fix a bug with spurious superclass constraints
* Fix and extend the Haddock API
Changes in version 2.12.0
* Labeled URLs (e.g <http://example.net/ some label>)
* Improved memory usage (new dependency: deepseq)
Changes in version 2.11.0
* Show deprecation messages for identifiers
* List identifiers declared on the same line (with a common type) separately
* Don't crash on unicode strings in doc comments
* Fix reporting of modules safe haskell mode
* Fix a case where we were generating invalid xhtml
* Improved --qual option (no crashes, proper error messages)
* A new --qual option "aliased" which qualifies identifiers by the module alias
used in the source code
* The Haddock API restores GHC's static flags after invocation
* Access to unexported identifiers through the Haddock API again
Changes in version 2.10.0
* Require GHC >= 7.4
* Safe Haskell indications on module pages
* Type declarations on identifiers no longer necessary
* Add flag --interface-version
* Warn when comment refers to in-scope identifier without documentation
* Bug fix: links to out-of-scope things (#78)
* Bug fix: module references to other packages work again
Changes in version 2.9.4
* Require GHC >= 7.2
* Support Alex 3.x
Changes in version 2.9.3
[This is the version that comes with GHC 7.2.1 although it claims it's 2.9.2!]
* Build with GHC 7.2.1
* Support blank lines in results of examples
* A type signature for multiple names generates one signature in the output
* Minor bug fixes
Changes in version 2.9.2
* Build with GHC 7.0.2
* Write Hoogle output in utf8; fixes GHC build on Windows
Changes in version 2.9.1
* Fix build in GHC tree
* Improve .cabal file
Changes in version 2.9.0
* Drop support for ghc < 7
* New flag --qual for qualification of names
* Print doc coverage information to stdout when generating docs
* Include an 'All' option in the A-Z subdivided index
* Make TOC group header identifiers validate
* Minor changes to the API
Changes in the version that comes with GHC 7.0.1
[This version claims it is 2.8.0 but is actually based on 2.8.1]
* Fix URL creation on Windows: Use / not \ in URLs.
* Support GHC 7.0
Changes in version 2.8.1
* Fix build on Windows with MinGW
Changes in version 2.8.0
* HTML backend completely rewritten to generate semantically rich XHTML
using the xhtml package.
* New default CSS based on the color scheme chosen for the new Haskell
wiki, with a pull-out tab for the synopsis.
* Theme engine based on CSS files. Themes can be switched from the
header menu. (New flags --built-in-themes and --theme. The latter
is an alias for --css which now has extended semantics).
* Markup support for executable examples/unit-tests. To be used with an
upcoming version of the DocTest program.
* Addition of a LaTeX backend.
* Frames-mode can be enabled from the header menu.
* Path to source entities can be specified per package, so that source
links work for cross-package documentation.
* Support for a second form of enumerated lists (1. 2. etc).
* Additions and changes to the Haddock API.
* New flag --no-tmp-comp-dir to tell Haddock to write and pick up
compilation files (.o, .hi, etc) to/from GHC's output directory instead
of a temporary directory.
* Various bug fixes.
-----------------------------------------------------------------------------
Changes in version 2.6.1 (bug fix release from the stable branch)
* Fix #128
-----------------------------------------------------------------------------
Changes in version 2.7.2
* Add Paths_haddock to library
-----------------------------------------------------------------------------
Changes in version 2.7.1:
* Fix problems with library part of .cabal file
-----------------------------------------------------------------------------
Changes in version 2.7.0:
* Instances can be commented
* The Haddock API now exposes more of the internals of Haddock
* Bug fixes (most importantly #128)
-----------------------------------------------------------------------------
Changes in version 2.6.0:
* Drop support for GHC 6.10.*
* Add support for GHC 6.12.1
* Cross-package documentation: full documentation show up when re-exporting
things coming from external packages
* Lexing and parsing the Haddock comment markup is now done in Haddock
again, instead of in GHC
* Slightly prettier printing of instance heads
* Support platforms for which GHC has no native code generator
* Add a flag --print-ghc-libdir
* Minor bug fixes
-----------------------------------------------------------------------------
Changed in version 2.5.0:
* Drop support for GHC 6.8.*
* Add support for GHC 6.10.3 and 6.10.4
* Revert to the old multi-page index for large packages (#106)
* Show GADT records in the generated documentation
* Create output directory if it doesn't exist (#104)
* Use the native codegen instead of compiling via C for TH modules
* Add --use-unicode flag for displaying prettier versions of common symbols
* Multiple verbosity levels: remove --verbose and add --verbosity=n
-----------------------------------------------------------------------------
Changed in version 2.4.2:
* Support GHC 6.10.2
* Haddock no longer crashes on Template Haskell modules (#68)
(only with GHC 6.10.2 or above)
* Fix problem with Template Haskell-generated declarations disappearing (#59)
* Generate two anchors for each link for compatibility between IE and Opera
(#45)
* Improved error messages
* Show re-exports from external packages again (GHC ticket #2746)
* Store hidden modules in .haddock files again (needed by the haddock
library)
* Avoid processing boot modules
* Pragmas may exist between document comments and declarations
* Do not indicate that a constructor argument is unboxed
* Fix problem with non-working links to ghc-prim
* Allow referring to a specific section within a module in a module link
(#65)
* Fixes to the Hoogle backend
* Improvements to the haddock library
* Many other fixes (including #67, #69, #58, #57)
-----------------------------------------------------------------------------
Changed in version 2.4.1:
* Depend on base 4.* when GHC >= 6.9, otherwise 3.*
-----------------------------------------------------------------------------
Changed in version 2.4.0:
* Add framed view of the HTML documentation
* Build with GHC 6.8.2 and 6.8.3 again
* Support images in documentation comments again
* Small improvements to the Hoogle output
* A few bugs has been fixed
-----------------------------------------------------------------------------
Changed in version 2.3.0:
* Support for GHC 6.10.1
* Slightly improved space usage
* Fix a bug that made hidden modules show up in the contents & index pages
* Fix a bug that made Haddock load modules twice
* Improvements to the Hoogle output
-----------------------------------------------------------------------------
Changed in version 2.2.2:
* Relax version dependency on ghc-paths
-----------------------------------------------------------------------------
Changes in version 2.2.1:
* Support for GHC 6.8.3
* The Hoogle backend is back, thanks to Neil Mitchell. The plan is to be
compatible with the upcoming Hoogle 4 pre-release
* Show associated types in the documentation for class declarations
* Show type family declarations
* Show type equality predicates
* Major bug fixes (#1 and #44)
* It is no longer required to specify the path to GHC's lib dir
* Remove unnecessary parenthesis in type signatures
-----------------------------------------------------------------------------
Changes in version 2.1.0:
* Fix a bug that made links point to the defining module instead
of the "best" one (e.g Int pointing to GHC.Base instead of Data.Int)
* Fix a couple of smaller bugs
* The representation of DocName was changed in the library
* Add a flag --no-warnings for turning off warnings
-----------------------------------------------------------------------------
Changes in version 2.0.0.0:
* The GHC API is used as the front-end
* Haddock now understands all syntax understood by GHC 6.8.2
* Haddock can generate documentation for some of the language extensions
in GHC 6.8.2
* Format of module attributes has changed. The only way of specifying
module attributes is via a new OPTIONS_HADDOCK pragma. Example:
{-# OPTIONS_HADDOCK hide, prune #-}
* Haddock understands literate source files
* Add a small library to read Haddock's interface files
* Add a flag -B for passing the path to the GHC lib dir
* Add a flag --optghc for passing options to GHC
* Add a flag --ghc-version for printing the GHC version
* Remove --use-package, --allow-missing-html, --ghc-pkg, in favour of only
supporting --read-interface
* Remove --package flag, the GHC flag -package-name can be used instead
* Remove --no-implicit-prelude flag, the GHC flag -XNoImplicitPrelude can
be used instead
-----------------------------------------------------------------------------
Changes in version 0.9:
* Infix type operators, e.g., first :: a~>a' -> (a,b)~>(a',b)
* Add a search box to the index page which automatically narrows
the index to the search as you type (thanks to Neil Mitchell).
* Add a --ghc-pkg flag
* Add a flag --allow-missing-html
* URL expansion for %%, %L, %{LINE}
* added substitution %{FILE///c}
* Lexing of /.../ is now more like '...', in that a / character must
be matched by another / character on the same line, otherwise it
is treated as a literal '/'. This removes a common source of
accidental parse errors in documentation.
* Various bugs were fixed.
* Cabal 1.2 is now required, and Haddock builds with GHC 6.8.x.
-----------------------------------------------------------------------------
Changes in version 0.8:
* Haddock has a Cabal build system, and will build on Windows without
Cygwin or MSYS. GHC 6.4 or later is required.
* New options: --comments-base, --comments-module, --comments-entity
for generating links to pages (eg. wiki) for collecting user comments.
* New options: --source-base, --source-module, --source-entity
for generating links to source code. Haddock now understands
{-# LINE #-} pragmas, which means it can figure out the correct
name for the source file even if the file is preprocessed.
* Haddock generates output for populating the Hoogle search engine.
* New markup <<url>> for including images.
-----------------------------------------------------------------------------
Changes in version 0.7:
......@@ -50,7 +628,7 @@ Changes in version 0.6:
now turned off by default; Haddock should be a little less noisy
in general.
* Markup for definition lists has been added. See the documentation
* Markup for definition lists has been added. See the documentation
for details.
* New option: --package for setting the package name. The package
......@@ -90,7 +668,7 @@ Changes in version 0.4:
which describe the exports of a set of modules. This is useful
for generating documentation which hyperlinks to
previously-generated documentation.
* Support for generating the extra files required by the Microsoft
Help compiler.
......@@ -101,9 +679,9 @@ Changes in version 0.4:
-----------------------------------------------------------------------------
Changes in version 0.3:
* Documentation on individual function arguments is now implemented
* Documentation on individual function arguments is now implemented
* Links can be made to identifiers that aren't in scope, by using
the fully qualified name.
......
If you're filing an issue, here are the things which will help us a lot:
* State your GHC version.
* State your platform, OS and distribution if applicable.
* State your cabal version if applicable.
* Tell us how to replicate the problem. If we can't replicate it, we
can't fix it.
* If the problem involves running Haddock on some source, please
include the sample on which we can replicate, the smaller/cleaner
the better. Include some images if you think it will help us.
* Include any other info you think might be relevant (sandbox? unusual
setup?).
Copyright 2002, Simon Marlow. All rights reserved.
Copyright 2002-2010, Simon Marlow. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
......
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
dir = utils/haddock
TOP = ../..
include $(TOP)/mk/sub-makefile.mk
Haddock, a Haskell Documentation Tool
=====================================
# Haddock, a Haskell Documentation Tool
#### About haddock
This is Haddock, a tool for automatically generating documentation
from annotated Haskell source code. It is primary intended for
documenting library interfaces, but it should be useful for any kind
of Haskell code.
Like other systems ([1],[2]), Haddock lets you write documentation
annotations next to the definitions of functions and types in the
source code, in a syntax that is easy on the eye when writing the
source code (no heavyweight mark-up). The documentation generated by
Haddock is fully hyperlinked - click on a type name in a type
signature to go straight to the definition, and documentation, for
that type.
Haddock lets you write documentation annotations next to the
definitions of functions and types in the source code, in a syntax
that is easy on the eye when writing the source code (no heavyweight
mark-up). The documentation generated by Haddock is fully hyperlinked
- click on a type name in a type signature to go straight to the
definition, and documentation, for that type.
Haddock understands Haskell's module system, so you can structure your
code however you like without worrying that internal structure will be
......@@ -27,27 +28,45 @@ generated. Abstract types and classes are handled correctly. In
fact, even without any documentation annotations, Haddock can generate
useful documentation from your source code.
#### Documentation formats
Haddock can generate documentation in multiple formats; currently HTML
is implemented, and there is partial support for generating DocBook.
The generated HTML uses stylesheets, so you need a fairly up-to-date
browser to view it properly (Mozilla, Konqueror, Opera, and IE 6
should all be ok).
is implemented, and there is partial support for generating LaTeX and
Hoogle.
#### Source code documentation
Full documentation can be found in the doc/ subdirectory, in DocBook
format.
Please send questions and suggestions to me:
Simon Marlow <simonmar@microsoft.com>
#### Contributing
System Requirements
===================
Please create issues when you have any problems and pull requests if you have some code.
Haddock currently requires GHC version 4.08 or later to compile.
###### Hacking
To get started you'll need a latest GHC release installed. Below is an
example setup using cabal sandboxes.
[1] IDoc - A No Frills Haskell Interface Documentation System
http://www.cse.unsw.edu.au/~chak/haskell/idoc/
```bash
git clone https://github.com/haskell/haddock.git
cd haddock
cabal sandbox init
cabal sandbox add-source haddock-library
cabal sandbox add-source haddock-api
# adjust -j to the number of cores you want to use
cabal install -j4 --dependencies-only --enable-tests
cabal configure --enable-tests
cabal build -j4
# run the test suite
cabal test
```
[2] HDoc http://www.fmi.uni-passau.de/~groessli/hdoc/
If you're a GHC developer and want to update Haddock to work with your
changes, you should be working on `ghc-head` branch instead of master.
See instructions at
https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules
for an example workflow.
See http://github.com/waern/haskell-style-guide
#! /usr/bin/runhaskell
\begin{code}
import Distribution.Simple
main = defaultMain
\end{code}
#!/usr/bin/env runhaskell
> import Distribution.Simple
> main = defaultMain
-- ---------------------------------------------------------------------------
-- Before next release
-----------------------------------------------------------------------------
-- bugs
* HsParser bug: starting the module with '-- | doc' followed by a declaration
doesn't parse, because the '-- | doc' is interpreted as the module
documentation (the grammar has an S/R conflict because of this).
* We don't point module references ("..." in doc strings) to the correct
package, they are always assumed to be modules in the current package.
* For a non-home occurrence of an entity, we should point to the home
location in the doc somehow. This would help to distinguish
multiple functions with the same name (eg. we don't know whether
Prelude.catch is Control.Exception.catch vs. System.IO.Error.catch).
* The lexer should handle "...." in doc strings, only recognising it if the
contents looks like a module name.
* Mentioning a qualified identifer in doc loses the qualifier, even when
it is required? (see "[Haskell] auto-qualification of identifiers in
Haddock").
* A module re-export should only reference the target module if the
target module is imported without hiding any of its exports (otherwise
we should inline just the exported bits).
* remove the s/r conflicts I added to the grammar
* Support for the rest of GHC extensions in the parser:
- scoped type variables (return types left to do).
- template haskell
- explicit kind annotations
- infix type constructors
* Be a bit cleaner about error cases: some internal errors can be
generated by bugs in the Haskell source. Divide out the proper
internal error cases and emit proper error messages.
* derived instance support isn't quite right (doing it properly is
hard, though).
* The synopsis generated for a module with no docs should not attempt to
link to the doc for each entity. We need a different kind of summary
here: what we really want is just the documentation section but without
the extra whitespace between decls.
* We don't handle non-ASCII characters in doc comments. (need to specify
the encoding in the generated HTML too?).
* There's no way to refer explicitly to either a type/class
constructor or data constructor When there are more than one of
these with the same name. Perhaps introduce a special syntax for
them? (eg. ':C' means data constructor C?)
-----------------------------------------------------------------------------
-- features
* Haddock could compare interfaces from multiple versions of a module
and indicate changes between versions (eg. a small "new!" or
"changed!" icon, or "stable since 1.0").
* Something equivalent to JavaDoc's @since
* Source code: various people want to get at the source code from the docs.
* Optionally include source code for a function in its docs?
* Suggestion from Benjamin Pierce: generat separate HTML pages with the
source code, with anchors that you can link to from the docs.
Sounds fairly easy to implement...
* Parse and remember {-# SOURCE #-} imports, possibly do something sensible
with them?
* nested itemized and enumerated lists.
* There ought to be a way to include some structure in the "description"
(section headings, etc.) and possibly in other comments. (suggseted
by Daan).
* Comments on instance declarations? (suggested by Daan and Iavor).
* Comments on default method declarations? (suggested by Satnam).
* Comments on components of a tuple, for argument or return types.
* Add a search feature which just invokes Google?
* attributes for individual declarations, eg.
-- #abstract
or targetted to a specific decl:
-- #T: abstract
#long, #short, #noinstances (on a type or class)
#inline, #noinline on a module export
* Allow documentation annotations to explicitly name the entity they
refer to.
* In the contents page, indicate portability/stability of each module
somehow.
* Add back-references from the definition to the uses of types/classes
(perhaps in the index?)
* Add a link to the defining location of a re-exported entity
* fixities
* include file revision info in module headers
* Allow individual function arguments to be documented when the function
type is a record element?
* hiding instances?
* Add a way to indicate DEPRECATED functions/types/modules? Perhaps
parse the GHC DEPRECATED pragma?
-----------------------------------------------------------------------------
-- cosmetic
* Allow more parts of the documentation to be squashed and expanded?
* for a constructor, don't fill its entire cell with a grey background.
* switch to longer rendering form for datatypes when necessary?
* remove extra whitespace from the generated HTML to save space
# mini script for building the relocatable Windows binary distribution.
#
# sh build-windows-dist.sh
#
# NB. the Cabal that shipped with GHC 6.6 isn't enough for this, because it
# is missing this patch:
#
# Fri Oct 13 11:09:41 BST 2006 Simon Marlow <simonmar@microsoft.com>
# * Fix getDataDir etc. when bindir=$prefix
#
# So you need to use a more recent Cabal. GHC 6.6 is fine for building the
# package, though.
ghc --make Setup
./Setup configure --prefix=`pwd`/install --bindir='$prefix' --libdir='$prefix' --datadir='$prefix'
./Setup build
./Setup install
echo Now zip up `pwd`/install as "haddock-<version>-Win32.zip"
Haddock documentation
---------------------
# Haddock documentation
The documentation is in DocBook XML format. You need some tools to
process it: at least xsltproc, and the DocBook XML DTD and XSL
......@@ -8,18 +7,19 @@ process the documentation on your system, and a Makefile to actually
do the processing (so, on Windows, you'll need Cygwin or MSys in
addition to the DocBook XML tools). To build the HTML documentation:
$ ./configure
$ make html
$ autoconf
$ ./configure
$ make html
which leaves the HTML documentation in a haddock/ subdirectory.
Printable documentation can also be produced, eg.:
$ make pdf
$ make pdf
or
$ make ps
$ make ps
Generating the printed formats requires more tools (fop or xmltex) and
tends to be a bit harder.
......@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([Makefile])
dnl ** check for DocBook toolchain
FP_CHECK_DOCBOOK_DTD
FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl])
FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /usr/share/xml/docbook/xsl-stylesheets-*])
FP_PROG_FO_PROCESSOR
AC_CONFIG_FILES([config.mk])
......
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
utils/haddock/doc_DOCBOOK_SOURCES = utils/haddock/doc/haddock.xml
$(eval $(call docbook,utils/haddock/doc,haddock))
This diff is collapsed.
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Exception
import Documentation.Haddock (haddock)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO
main :: IO ()
main = getArgs >>= expandResponse >>= haddock
-- | Arguments which look like '@foo' will be replaced with the
-- contents of file @foo@. The contents will be passed through 'words'
-- and blanks filtered out first.
--
-- We quit if the file is not found or reading somehow fails.
expandResponse :: [String] -> IO [String]
expandResponse = fmap concat . mapM expand
where
expand :: String -> IO [String]
expand ('@':f) = readFileExc f >>= return . filter (not . null) . lines
expand x = return [x]
readFileExc f =
readFile f `catch` \(e :: IOException) -> do
hPutStrLn stderr $ "Error while expanding response file: " ++ show e
exitFailure
module A where
data A = A