aboutsummaryrefslogtreecommitdiff
path: root/doc/haddock.sgml
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-07-28 13:31:25 +0000
committersimonmar <unknown>2003-07-28 13:31:25 +0000
commit122bd578c258386479a7ba14cea39c035fbe1c2a (patch)
treef75f1838e4d8ca7f965d4c7e7665000cfc3c4fea /doc/haddock.sgml
parent70e137ead1809516991ff4152842be08561404ee (diff)
[haddock @ 2003-07-28 13:31:25 by simonmar]
Add documentation for anchors.
Diffstat (limited to 'doc/haddock.sgml')
-rw-r--r--doc/haddock.sgml19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/haddock.sgml b/doc/haddock.sgml
index 58784f56..ce443a80 100644
--- a/doc/haddock.sgml
+++ b/doc/haddock.sgml
@@ -1139,6 +1139,25 @@ module A where
it, the URL will be turned into a hyperlink when
rendered.</para>
</section>
+
+ <section>
+ <title>Anchors</title>
+
+ <para>Sometimes it is useful to be able to link to a point in
+ the documentation which doesn't correspond to a particular
+ entity. For that purpose, we allow <emph>anchors</emph> to be
+ included in a documentation comment. The syntax is
+ <literal>#<replaceable>label</replaceable>#</literal>, where
+ <replaceable>label</replaceable> is the name of the anchor.
+ An anchor is invisible in the generated documentation.</para>
+
+ <para>To link to an anchor from elsewhere, use the syntax
+ <literal>"<replaceable>module</replaceable>#<replaceable>label</replaceable>"</literal>
+ where <replaceable>module</replaceable> is the module name
+ containing the anchor, and <replaceable>label</replaceable> is
+ the anchor label. The module does not have to be local, it
+ can be imported via an interface.</para>
+ </section>
</section>
</chapter>
</book>