aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/copy.hs0
-rw-r--r--tests/output/A.html116
-rw-r--r--tests/output/A.html.ref (renamed from tests/pre-2.0-tests/A.html.ref)2
-rw-r--r--tests/output/B.html86
-rw-r--r--tests/output/B.html.ref (renamed from tests/pre-2.0-tests/B.html.ref)2
-rw-r--r--tests/output/Bug1.html150
-rw-r--r--tests/output/Bug1.html.ref (renamed from tests/pre-2.0-tests/Bug1.html.ref)2
-rw-r--r--tests/output/Bug2.html90
-rw-r--r--tests/output/Bug2.html.ref (renamed from tests/pre-2.0-tests/Bug2.html.ref)2
-rw-r--r--tests/output/Bug3.html114
-rw-r--r--tests/output/Bug3.html.ref (renamed from tests/pre-2.0-tests/Bug3.html.ref)2
-rw-r--r--tests/output/Bug4.html113
-rw-r--r--tests/output/Bug4.html.ref (renamed from tests/pre-2.0-tests/Bug4.html.ref)2
-rw-r--r--tests/output/Bug6.html482
-rw-r--r--tests/output/Bug6.html.ref (renamed from tests/pre-2.0-tests/Bug6.html.ref)2
-rw-r--r--tests/output/Bug7.html242
-rw-r--r--tests/output/Bug7.html.ref (renamed from tests/pre-2.0-tests/Bug7.html.ref)2
-rw-r--r--tests/output/Bug8.html128
-rw-r--r--tests/output/Bug8.html.ref (renamed from tests/pre-2.0-tests/Bug8.html.ref)2
-rw-r--r--tests/output/Bugs.html116
-rw-r--r--tests/output/Hash.html412
-rw-r--r--tests/output/Hash.html.ref (renamed from tests/pre-2.0-tests/Hash.html.ref)2
-rw-r--r--tests/output/Hidden.html.ref (renamed from tests/pre-2.0-tests/Hidden.html.ref)0
-rw-r--r--tests/output/NoLayout.html113
-rw-r--r--tests/output/NoLayout.html.ref (renamed from tests/pre-2.0-tests/NoLayout.html.ref)2
-rw-r--r--tests/output/Test.html3105
-rw-r--r--tests/output/Test.html.ref (renamed from tests/pre-2.0-tests/Test.html.ref)14
-rw-r--r--tests/output/TypeOperators.html380
-rw-r--r--tests/output/TypeOperators.html.ref (renamed from tests/extensions/TypeOperators.html.ref)2
-rw-r--r--tests/output/Visible.html88
-rw-r--r--tests/output/Visible.html.ref (renamed from tests/pre-2.0-tests/Visible.html.ref)2
-rw-r--r--tests/output/doc-index.html1104
-rw-r--r--tests/output/index.html208
-rw-r--r--tests/runtests.hs36
-rw-r--r--tests/tests/A.hs (renamed from tests/pre-2.0-tests/A.hs)0
-rw-r--r--tests/tests/A.html.ref116
-rw-r--r--tests/tests/B.hs (renamed from tests/pre-2.0-tests/B.hs)0
-rw-r--r--tests/tests/B.html.ref86
-rw-r--r--tests/tests/Bug1.hs (renamed from tests/pre-2.0-tests/Bug1.hs)0
-rw-r--r--tests/tests/Bug1.html.ref150
-rw-r--r--tests/tests/Bug2.hs (renamed from tests/pre-2.0-tests/Bug2.hs)0
-rw-r--r--tests/tests/Bug2.html.ref90
-rw-r--r--tests/tests/Bug3.hs (renamed from tests/pre-2.0-tests/Bug3.hs)0
-rw-r--r--tests/tests/Bug3.html.ref114
-rw-r--r--tests/tests/Bug4.hs (renamed from tests/pre-2.0-tests/Bug4.hs)0
-rw-r--r--tests/tests/Bug4.html.ref113
-rw-r--r--tests/tests/Bug6.hs (renamed from tests/pre-2.0-tests/Bug6.hs)0
-rw-r--r--tests/tests/Bug6.html.ref482
-rw-r--r--tests/tests/Bug7.hs (renamed from tests/pre-2.0-tests/Bug7.hs)0
-rw-r--r--tests/tests/Bug7.html.ref242
-rw-r--r--tests/tests/Bug8.hs (renamed from tests/pre-2.0-tests/Bug8.hs)0
-rw-r--r--tests/tests/Bug8.html.ref128
-rw-r--r--tests/tests/Bugs.hs3
-rw-r--r--tests/tests/Bugs.html.ref116
-rw-r--r--tests/tests/Hash.hs (renamed from tests/pre-2.0-tests/Hash.hs)0
-rw-r--r--tests/tests/Hash.html.ref412
-rw-r--r--tests/tests/Hidden.hs (renamed from tests/pre-2.0-tests/Hidden.hs)0
-rw-r--r--tests/tests/NoLayout.hs (renamed from tests/pre-2.0-tests/NoLayout.hs)0
-rw-r--r--tests/tests/NoLayout.html.ref113
-rw-r--r--tests/tests/Test.hs (renamed from tests/pre-2.0-tests/Test.hs)0
-rw-r--r--tests/tests/Test.html.ref3105
-rw-r--r--tests/tests/TypeOperators.hs (renamed from tests/extensions/TypeOperators.hs)0
-rw-r--r--tests/tests/TypeOperators.html.ref380
-rw-r--r--tests/tests/Visible.hs (renamed from tests/pre-2.0-tests/Visible.hs)0
-rw-r--r--tests/tests/Visible.html.ref88
65 files changed, 12816 insertions, 45 deletions
diff --git a/tests/copy.hs b/tests/copy.hs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/copy.hs
diff --git a/tests/output/A.html b/tests/output/A.html
new file mode 100644
index 00000000..3a3c137b
--- /dev/null
+++ b/tests/output/A.html
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>A</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>A</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AA"
+></A
+><B
+>A</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/A.html.ref b/tests/output/A.html.ref
index 598bf23c..3a3c137b 100644
--- a/tests/pre-2.0-tests/A.html.ref
+++ b/tests/output/A.html.ref
@@ -108,7 +108,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/B.html b/tests/output/B.html
new file mode 100644
index 00000000..a69e45ad
--- /dev/null
+++ b/tests/output/B.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>B</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>B</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="A.html"
+>A</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/B.html.ref b/tests/output/B.html.ref
index 8ff0218d..a69e45ad 100644
--- a/tests/pre-2.0-tests/B.html.ref
+++ b/tests/output/B.html.ref
@@ -78,7 +78,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug1.html b/tests/output/Bug1.html
new file mode 100644
index 00000000..462f088b
--- /dev/null
+++ b/tests/output/Bug1.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug1</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug1</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT"
+>T</A
+> = <A HREF="#v%3AT"
+>T</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT"
+></A
+><B
+>T</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>We should have different anchors for constructors and types/classes. This
+ hyperlink should point to the type constructor by default: <TT
+><A HREF="Bug1.html#t%3AT"
+>T</A
+></TT
+>.
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AT"
+></A
+><B
+>T</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug1.html.ref b/tests/output/Bug1.html.ref
index 7160bdaf..462f088b 100644
--- a/tests/pre-2.0-tests/Bug1.html.ref
+++ b/tests/output/Bug1.html.ref
@@ -142,7 +142,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug2.html b/tests/output/Bug2.html
new file mode 100644
index 00000000..aa9d6647
--- /dev/null
+++ b/tests/output/Bug2.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug2</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug2</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ax"
+></A
+><B
+>x</B
+> :: <A HREF="A.html#t%3AA"
+>A</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug2.html.ref b/tests/output/Bug2.html.ref
index d06e84ee..aa9d6647 100644
--- a/tests/pre-2.0-tests/Bug2.html.ref
+++ b/tests/output/Bug2.html.ref
@@ -82,7 +82,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug3.html b/tests/output/Bug3.html
new file mode 100644
index 00000000..60f4b890
--- /dev/null
+++ b/tests/output/Bug3.html
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug3</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug3</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Afoo"
+>foo</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Afoo"
+></A
+><B
+>foo</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>/multi-line
+ emphasis/
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug3.html.ref b/tests/output/Bug3.html.ref
index a5a03f3d..60f4b890 100644
--- a/tests/pre-2.0-tests/Bug3.html.ref
+++ b/tests/output/Bug3.html.ref
@@ -106,7 +106,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug4.html b/tests/output/Bug4.html
new file mode 100644
index 00000000..c2921742
--- /dev/null
+++ b/tests/output/Bug4.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug4</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug4</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Afoo"
+>foo</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Afoo"
+></A
+><B
+>foo</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>don't use apostrophe's in the wrong place's
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug4.html.ref b/tests/output/Bug4.html.ref
index 75a0b740..c2921742 100644
--- a/tests/pre-2.0-tests/Bug4.html.ref
+++ b/tests/output/Bug4.html.ref
@@ -105,7 +105,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug6.html b/tests/output/Bug6.html
new file mode 100644
index 00000000..806f5470
--- /dev/null
+++ b/tests/output/Bug6.html
@@ -0,0 +1,482 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug6</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug6</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Exporting records.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AA"
+>A</A
+> = <A HREF="#v%3AA"
+>A</A
+> Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AB"
+>B</A
+> = <A HREF="#v%3AB"
+>B</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ab"
+>b</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ab"
+>b</A
+> :: <A HREF="Bug6.html#t%3AB"
+>B</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AC"
+>C</A
+> = <A HREF="#v%3AC"
+>C</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ac1"
+>c1</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ac2"
+>c2</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AD"
+>D</A
+> = <A HREF="#v%3AD"
+>D</A
+> Int Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AE"
+>E</A
+> = <A HREF="#v%3AE"
+>E</A
+> Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AA"
+></A
+><B
+>A</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This record is exported without its field
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+> Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AB"
+></A
+><B
+>B</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>.. with its field, but the field is named separately in the export list
+ (should still be visible as a field name)
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB"
+></A
+><B
+>B</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ab"
+></A
+><B
+>b</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ab"
+></A
+><B
+>b</B
+> :: <A HREF="Bug6.html#t%3AB"
+>B</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AC"
+></A
+><B
+>C</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>.. with fields names as subordinate names in the export
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC"
+></A
+><B
+>C</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ac1"
+></A
+><B
+>c1</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ac2"
+></A
+><B
+>c2</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AD"
+></A
+><B
+>D</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>.. with only some of the fields exported (we can't handle this one -
+ how do we render the declaration?)
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AD"
+></A
+><B
+>D</B
+> Int Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AE"
+></A
+><B
+>E</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>a newtype with a field
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AE"
+></A
+><B
+>E</B
+> Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug6.html.ref b/tests/output/Bug6.html.ref
index 7fe93681..806f5470 100644
--- a/tests/pre-2.0-tests/Bug6.html.ref
+++ b/tests/output/Bug6.html.ref
@@ -474,7 +474,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug7.html b/tests/output/Bug7.html
new file mode 100644
index 00000000..788ae3a9
--- /dev/null
+++ b/tests/output/Bug7.html
@@ -0,0 +1,242 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug7</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug7</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This module caused a duplicate instance in the documentation for the Foo
+ type.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AFoo"
+>Foo</A
+> = <A HREF="#v%3AFoo"
+>Foo</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3ABar"
+>Bar</A
+> x y </TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AFoo"
+></A
+><B
+>Foo</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>The Foo datatype
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AFoo"
+></A
+><B
+>Foo</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Foo')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:Foo" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="Bug7.html#t%3ABar"
+>Bar</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3ABar"
+></A
+><B
+>Bar</B
+> x y </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>The Bar class
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Bar')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:Bar" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="Bug7.html#t%3ABar"
+>Bar</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug7.html.ref b/tests/output/Bug7.html.ref
index d2014754..788ae3a9 100644
--- a/tests/pre-2.0-tests/Bug7.html.ref
+++ b/tests/output/Bug7.html.ref
@@ -234,7 +234,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bug8.html b/tests/output/Bug8.html
new file mode 100644
index 00000000..d6be9969
--- /dev/null
+++ b/tests/output/Bug8.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug8</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug8</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ATyp"
+></A
+><B
+>Typ</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AType"
+></A
+><B
+>Type</B
+> (String, [<A HREF="Bug8.html#t%3ATyp"
+>Typ</A
+>])</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ATFree"
+></A
+><B
+>TFree</B
+> (String, [String])</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug8.html.ref b/tests/output/Bug8.html.ref
index 34a57f14..d6be9969 100644
--- a/tests/pre-2.0-tests/Bug8.html.ref
+++ b/tests/output/Bug8.html.ref
@@ -120,7 +120,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Bugs.html b/tests/output/Bugs.html
new file mode 100644
index 00000000..f9a3522b
--- /dev/null
+++ b/tests/output/Bugs.html
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bugs</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bugs</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AA"
+></A
+><B
+>A</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+> a (a -&gt; Int)</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/output/Hash.html b/tests/output/Hash.html
new file mode 100644
index 00000000..5e03b2ef
--- /dev/null
+++ b/tests/output/Hash.html
@@ -0,0 +1,412 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Hash</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Hash</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>The <TT
+>HashTable</TT
+> type
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#2"
+>Operations on <TT
+>HashTable</TT
+>s
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#3"
+>The <TT
+>Hash</TT
+> class
+</A
+></DT
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Implementation of fixed-size hash tables, with a type
+ class for constructing hash values for structured types.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AHashTable"
+>HashTable</A
+> key val</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Anew"
+>new</A
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; Int -&gt; IO (<A HREF="Hash.html#t%3AHashTable"
+>HashTable</A
+> key val)</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ainsert"
+>insert</A
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; key -&gt; val -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Alookup"
+>lookup</A
+> :: <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key =&gt; key -&gt; IO (Maybe val)</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AHash"
+>Hash</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ahash"
+>hash</A
+> :: a -&gt; Int</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>The <TT
+>HashTable</TT
+> type
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AHashTable"
+></A
+><B
+>HashTable</B
+> key val </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A hash table with keys of type <TT
+>key</TT
+> and values of type <TT
+>val</TT
+>.
+ The type <TT
+>key</TT
+> should be an instance of <TT
+>Eq</TT
+>.
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="2"
+>Operations on <TT
+>HashTable</TT
+>s
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Anew"
+></A
+><B
+>new</B
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; Int -&gt; IO (<A HREF="Hash.html#t%3AHashTable"
+>HashTable</A
+> key val)</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Builds a new hash table with a given size
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ainsert"
+></A
+><B
+>insert</B
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; key -&gt; val -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Inserts a new element into the hash table
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Alookup"
+></A
+><B
+>lookup</B
+> :: <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key =&gt; key -&gt; IO (Maybe val)</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Looks up a key in the hash table, returns <TT
+><TT
+>Just</TT
+> val</TT
+> if the key
+ was found, or <TT
+>Nothing</TT
+> otherwise.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="3"
+>The <TT
+>Hash</TT
+> class
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AHash"
+></A
+><B
+>Hash</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A class of types which can be hashed.
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ahash"
+></A
+><B
+>hash</B
+> :: a -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>hashes the value of type <TT
+>a</TT
+> into an <TT
+>Int</TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Hash.html.ref b/tests/output/Hash.html.ref
index c1034171..5e03b2ef 100644
--- a/tests/pre-2.0-tests/Hash.html.ref
+++ b/tests/output/Hash.html.ref
@@ -404,7 +404,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/pre-2.0-tests/Hidden.html.ref b/tests/output/Hidden.html.ref
index 2e4acc71..2e4acc71 100644
--- a/tests/pre-2.0-tests/Hidden.html.ref
+++ b/tests/output/Hidden.html.ref
diff --git a/tests/output/NoLayout.html b/tests/output/NoLayout.html
new file mode 100644
index 00000000..4709e907
--- /dev/null
+++ b/tests/output/NoLayout.html
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>NoLayout</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>NoLayout</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ag"
+>g</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ag"
+></A
+><B
+>g</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>the class C
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/NoLayout.html.ref b/tests/output/NoLayout.html.ref
index b0a862cc..4709e907 100644
--- a/tests/pre-2.0-tests/NoLayout.html.ref
+++ b/tests/output/NoLayout.html.ref
@@ -105,7 +105,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Test.html b/tests/output/Test.html
new file mode 100644
index 00000000..38df4004
--- /dev/null
+++ b/tests/output/Test.html
@@ -0,0 +1,3105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Test</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Test</FONT
+></TD
+><TD ALIGN="right"
+><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="infohead"
+>Portability</TD
+><TD CLASS="infoval"
+>portable</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Stability</TD
+><TD CLASS="infoval"
+>provisional</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Maintainer</TD
+><TD CLASS="infoval"
+>libraries@haskell.org</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>Type declarations
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#2"
+>Data types
+</A
+></DT
+><DT
+><A HREF="#3"
+>Records
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#4"
+>Class declarations
+</A
+></DT
+><DT
+><A HREF="#5"
+>Function types
+</A
+></DT
+><DT
+><A HREF="#6"
+>Auxiliary stuff
+</A
+></DT
+><DT
+><A HREF="#7"
+>A hidden module
+</A
+></DT
+><DT
+><A HREF="#8"
+>A visible module
+</A
+></DT
+><DT
+><A HREF="#9"
+>Existential / Universal types
+</A
+></DT
+><DT
+><A HREF="#10"
+>Type signatures with argument docs
+</A
+></DT
+><DT
+><A HREF="#11"
+>A section
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#12"
+>A subsection
+</A
+></DT
+></DL
+></DD
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This module illustrates &amp; tests most of the features of Haddock.
+ Testing references from the description: <TT
+><A HREF="Test.html#t%3AT"
+>T</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Af"
+>f</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Ag"
+>g</A
+></TT
+>, <TT
+><A HREF="Visible.html#v%3Avisible"
+>visible</A
+></TT
+>.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT"
+>T</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA"
+>A</A
+> Int (Maybe Float)</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB"
+>B</A
+> (<A HREF="Test.html#t%3AT"
+>T</A
+> a b, <A HREF="Test.html#t%3AT"
+>T</A
+> Int Float)</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT2"
+>T2</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT3"
+>T3</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA1"
+>A1</A
+> a</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB1"
+>B1</A
+> b</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT4"
+>T4</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA2"
+>A2</A
+> a</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB2"
+>B2</A
+> b</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT5"
+>T5</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA3"
+>A3</A
+> a</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB3"
+>B3</A
+> b</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT6"
+>T6</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA4"
+>A4</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB4"
+>B4</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AC4"
+>C4</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN1"
+>N1</A
+> a = <A HREF="#v%3AN1"
+>N1</A
+> a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN2"
+>N2</A
+> a b = <A HREF="#v%3AN2"
+>N2</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An"
+>n</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN3"
+>N3</A
+> a b = <A HREF="#v%3AN3"
+>N3</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An3"
+>n3</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AN4"
+>N4</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN5"
+>N5</A
+> a b = <A HREF="#v%3AN5"
+>N5</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An5"
+>n5</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN6"
+>N6</A
+> a b = <A HREF="#v%3AN6"
+>N6</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An6"
+>n6</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN7"
+>N7</A
+> a b = <A HREF="#v%3AN7"
+>N7</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An7"
+>n7</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AR"
+>R</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AC1"
+>C1</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ap"
+>p</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Aq"
+>q</A
+> :: <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ar"
+>r</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As"
+>s</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AC2"
+>C2</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3At"
+>t</A
+> :: T1 -&gt; (<A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int) -&gt; (<A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool) -&gt; (<A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float) -&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () ()</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Au"
+>u</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Av"
+>v</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AR1"
+>R1</A
+> = <A HREF="#v%3AC3"
+>C3</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As1"
+>s1</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As2"
+>s2</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As3"
+>s3</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ap"
+>p</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aq"
+>q</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Au"
+>u</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="Test.html#t%3AD"
+>D</A
+> a =&gt; <A HREF="#t%3AC"
+>C</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aa"
+>a</A
+> :: IO a</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ab"
+>b</A
+> :: [a]</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AD"
+>D</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ad"
+>d</A
+> :: <A HREF="Test.html#t%3AT"
+>T</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ae"
+>e</A
+> :: (a, a)</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AE"
+>E</A
+> a </TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AF"
+>F</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aff"
+>ff</A
+> :: a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aa"
+>a</A
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Af"
+>f</A
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; a -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ag"
+>g</A
+> :: Int -&gt; IO CInt</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ahidden"
+>hidden</A
+> :: Int -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="Visible.html"
+>Visible</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AEx"
+>Ex</A
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> b =&gt; <A HREF="#v%3AEx1"
+>Ex1</A
+> b</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="#v%3AEx2"
+>Ex2</A
+> b</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; <A HREF="#v%3AEx3"
+>Ex3</A
+> b</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AEx4"
+>Ex4</A
+> (<SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a)</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ak"
+>k</A
+> :: <A HREF="Test.html#t%3AT"
+>T</A
+> () () -&gt; <A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int -&gt; <A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool -&gt; <A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float -&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () () -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Al"
+>l</A
+> :: (Int, Int, Float) -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Am"
+>m</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; <A HREF="Test.html#t%3AN1"
+>N1</A
+> () -&gt; IO Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ao"
+>o</A
+> :: Float -&gt; IO Float</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Af%27"
+>f'</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>Type declarations
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="2"
+>Data types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT"
+></A
+><B
+>T</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This comment applies to the <EM
+>following</EM
+> declaration
+ and it continues until the next non-comment line
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+> Int (Maybe Float)</TD
+><TD CLASS="rdoc"
+>This comment describes the <TT
+><A HREF="Test.html#v%3AA"
+>A</A
+></TT
+> constructor
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB"
+></A
+><B
+>B</B
+> (<A HREF="Test.html#t%3AT"
+>T</A
+> a b, <A HREF="Test.html#t%3AT"
+>T</A
+> Int Float)</TD
+><TD CLASS="rdoc"
+>This comment describes the <TT
+><A HREF="Test.html#v%3AB"
+>B</A
+></TT
+> constructor
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT2"
+></A
+><B
+>T2</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>An abstract data declaration
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT3"
+></A
+><B
+>T3</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A data declaration with no documentation annotations on the constructors
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA1"
+></A
+><B
+>A1</B
+> a</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB1"
+></A
+><B
+>B1</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT4"
+></A
+><B
+>T4</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA2"
+></A
+><B
+>A2</B
+> a</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB2"
+></A
+><B
+>B2</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT5"
+></A
+><B
+>T5</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA3"
+></A
+><B
+>A3</B
+> a</TD
+><TD CLASS="rdoc"
+>documents <TT
+><A HREF="Test.html#v%3AA3"
+>A3</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB3"
+></A
+><B
+>B3</B
+> b</TD
+><TD CLASS="rdoc"
+>documents <TT
+><A HREF="Test.html#v%3AB3"
+>B3</A
+></TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT6"
+></A
+><B
+>T6</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>Testing alternative comment styles
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA4"
+></A
+><B
+>A4</B
+></TD
+><TD CLASS="rdoc"
+>This is the doc for <TT
+><A HREF="Test.html#v%3AA4"
+>A4</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB4"
+></A
+><B
+>B4</B
+></TD
+><TD CLASS="rdoc"
+>This is the doc for <TT
+><A HREF="Test.html#v%3AB4"
+>B4</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC4"
+></A
+><B
+>C4</B
+></TD
+><TD CLASS="rdoc"
+>This is the doc for <TT
+><A HREF="Test.html#v%3AC4"
+>C4</A
+></TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN1"
+></A
+><B
+>N1</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A newtype
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN1"
+></A
+><B
+>N1</B
+> a</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN2"
+></A
+><B
+>N2</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A newtype with a fieldname
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN2"
+></A
+><B
+>N2</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An"
+></A
+><B
+>n</B
+> :: a b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN3"
+></A
+><B
+>N3</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A newtype with a fieldname, documentation on the field
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN3"
+></A
+><B
+>N3</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An3"
+></A
+><B
+>n3</B
+> :: a b</TD
+><TD CLASS="rdoc"
+>this is the <TT
+><A HREF="Test.html#v%3An3"
+>n3</A
+></TT
+> field
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AN4"
+></A
+><B
+>N4</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>An abstract newtype - we show this one as data rather than newtype because
+ the difference isn't visible to the programmer for an abstract type.
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN5"
+></A
+><B
+>N5</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN5"
+></A
+><B
+>N5</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An5"
+></A
+><B
+>n5</B
+> :: a b</TD
+><TD CLASS="rdoc"
+>no docs on the datatype or the constructor
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN6"
+></A
+><B
+>N6</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN6"
+></A
+><B
+>N6</B
+></TD
+><TD CLASS="rdoc"
+>docs on the constructor only
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An6"
+></A
+><B
+>n6</B
+> :: a b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN7"
+></A
+><B
+>N7</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>docs on the newtype and the constructor
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN7"
+></A
+><B
+>N7</B
+></TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#t%3AN7"
+>N7</A
+></TT
+> constructor
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An7"
+></A
+><B
+>n7</B
+> :: a b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="3"
+>Records
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AR"
+></A
+><B
+>R</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This is the documentation for the <TT
+><A HREF="Test.html#t%3AR"
+>R</A
+></TT
+> record, which has four fields,
+ <TT
+><A HREF="Test.html#v%3Ap"
+>p</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Aq"
+>q</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Ar"
+>r</A
+></TT
+>, and <TT
+><A HREF="Test.html#v%3As"
+>s</A
+></TT
+>.
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC1"
+></A
+><B
+>C1</B
+></TD
+><TD CLASS="rdoc"
+>This is the <TT
+><A HREF="Test.html#v%3AC1"
+>C1</A
+></TT
+> record constructor, with the following fields:
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ap"
+></A
+><B
+>p</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Ap"
+>p</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Aq"
+></A
+><B
+>q</B
+> :: <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+><TD CLASS="rdoc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Aq"
+>q</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ar"
+></A
+><B
+>r</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>This comment applies to both <TT
+><A HREF="Test.html#v%3Ar"
+>r</A
+></TT
+> and <TT
+><A HREF="Test.html#v%3As"
+>s</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As"
+></A
+><B
+>s</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>This comment applies to both <TT
+><A HREF="Test.html#v%3Ar"
+>r</A
+></TT
+> and <TT
+><A HREF="Test.html#v%3As"
+>s</A
+></TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC2"
+></A
+><B
+>C2</B
+></TD
+><TD CLASS="rdoc"
+>This is the <TT
+><A HREF="Test.html#v%3AC2"
+>C2</A
+></TT
+> record constructor, also with some fields:
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3At"
+></A
+><B
+>t</B
+> :: T1 -&gt; (<A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int) -&gt; (<A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool) -&gt; (<A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float) -&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () ()</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Au"
+></A
+><B
+>u</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Av"
+></A
+><B
+>v</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AR1"
+></A
+><B
+>R1</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>Testing different record commenting styles
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC3"
+></A
+><B
+>C3</B
+></TD
+><TD CLASS="rdoc"
+>This is the <TT
+><A HREF="Test.html#v%3AC3"
+>C3</A
+></TT
+> record constructor
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As1"
+></A
+><B
+>s1</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#v%3As1"
+>s1</A
+></TT
+> record selector
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As2"
+></A
+><B
+>s2</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#v%3As2"
+>s2</A
+></TT
+> record selector
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As3"
+></A
+><B
+>s3</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#v%3As3"
+>s3</A
+></TT
+> record selector
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>test that we can export record selectors on their own:
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ap"
+></A
+><B
+>p</B
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Ap"
+>p</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aq"
+></A
+><B
+>q</B
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Aq"
+>q</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Au"
+></A
+><B
+>u</B
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="4"
+>Class declarations
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="Test.html#t%3AD"
+>D</A
+> a =&gt; <A NAME="t%3AC"
+></A
+><B
+>C</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This comment applies to the <EM
+>previous</EM
+> declaration (the <TT
+><A HREF="Test.html#t%3AC"
+>C</A
+></TT
+> class)
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aa"
+></A
+><B
+>a</B
+> :: IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>this is a description of the <TT
+><A HREF="Test.html#v%3Aa"
+>a</A
+></TT
+> method
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ab"
+></A
+><B
+>b</B
+> :: [a]</TD
+></TR
+><TR
+><TD CLASS="doc"
+>this is a description of the <TT
+><A HREF="Test.html#v%3Ab"
+>b</A
+></TT
+> method
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AD"
+></A
+><B
+>D</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This is a class declaration with no separate docs for the methods
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ad"
+></A
+><B
+>d</B
+> :: <A HREF="Test.html#t%3AT"
+>T</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ae"
+></A
+><B
+>e</B
+> :: (a, a)</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AE"
+></A
+><B
+>E</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This is a class declaration with no methods (or no methods exported)
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AF"
+></A
+><B
+>F</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aff"
+></A
+><B
+>ff</B
+> :: a</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Test that we can export a class method on its own:
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aa"
+></A
+><B
+>a</B
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>this is a description of the <TT
+><A HREF="Test.html#v%3Aa"
+>a</A
+></TT
+> method
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="5"
+>Function types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Af"
+></A
+><B
+>f</B
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; a -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>In a comment string we can refer to identifiers in scope with
+single quotes like this: <TT
+><A HREF="Test.html#t%3AT"
+>T</A
+></TT
+>, and we can refer to modules by
+using double quotes: <A HREF="Foo.html"
+>Foo</A
+>. We can add emphasis <EM
+>like this</EM
+>.
+</P
+><UL
+><LI
+> This is a bulleted list
+</LI
+><LI
+> This is the next item (different kind of bullet)
+</LI
+></UL
+><OL
+><LI
+> This is an ordered list
+</LI
+></OL
+><P
+>2. This is the next item (different kind of bullet)
+</P
+><PRE
+>
+ This is a block of code, which can include other markup: <TT
+><A HREF="Test.html#t%3AR"
+>R</A
+></TT
+>
+ formatting
+ is
+ significant
+</PRE
+><PRE
+> this is another block of code
+</PRE
+><P
+>We can also include URLs in documentation: <A HREF="http://www.haskell.org/"
+>http://www.haskell.org/</A
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ag"
+></A
+><B
+>g</B
+> :: Int -&gt; IO CInt</TD
+></TR
+><TR
+><TD CLASS="doc"
+>we can export foreign declarations too
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="6"
+>Auxiliary stuff
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>This is some documentation that is attached to a name ($aux1)
+ rather than a source declaration. The documentation may be
+ referred to in the export list using its name.
+</P
+><PRE
+> code block in named doc</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>This is some documentation that is attached to a name ($aux2)
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> code block on its own in named doc</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> code block on its own in named doc (after newline)</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>a nested, named doc comment
+</P
+><P
+>with a paragraph,
+</P
+><PRE
+> and a code block</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>test
+test1
+</PRE
+><PRE
+> test2
+ test3
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>
+test1
+test2
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>test3
+test4
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>
+test1
+test2
+</PRE
+><PRE
+>test3
+test4
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>test3
+test4
+</PRE
+><PRE
+>
+test1
+test2
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>aux11:
+</P
+><PRE
+>test3
+test4
+</PRE
+><PRE
+>
+test1
+test2
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> foo
+</PRE
+><PRE
+> bar
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>This is some inline documentation in the export list
+</P
+><PRE
+> a code block using bird-tracks
+ each line must begin with &gt; (which isn't significant unless it
+ is at the beginning of the line).
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="7"
+>A hidden module
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ahidden"
+></A
+><B
+>hidden</B
+> :: Int -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="8"
+>A visible module
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="Visible.html"
+>Visible</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>nested-style doc comments
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="9"
+>Existential / Universal types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AEx"
+></A
+><B
+>Ex</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A data-type using existential/universal types
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> b =&gt; <A NAME="v%3AEx1"
+></A
+><B
+>Ex1</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A NAME="v%3AEx2"
+></A
+><B
+>Ex2</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; <A NAME="v%3AEx3"
+></A
+><B
+>Ex3</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AEx4"
+></A
+><B
+>Ex4</B
+> (<SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a)</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="10"
+>Type signatures with argument docs
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ak"
+></A
+><B
+>k</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: <A HREF="Test.html#t%3AT"
+>T</A
+> () ()</TD
+><TD CLASS="rdoc"
+>This argument has type <TT
+><A HREF="Test.html#t%3AT"
+>T</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int</TD
+><TD CLASS="rdoc"
+>This argument has type 'T2 Int Int'
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool -&gt; <A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float</TD
+><TD CLASS="rdoc"
+>This argument has type <TT
+>T3 Bool Bool -&gt; T4 Float Float</TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () ()</TD
+><TD CLASS="rdoc"
+>This argument has a very long description that should
+ hopefully cause some wrapping to happen when it is finally
+ rendered by Haddock in the generated HTML page.
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; IO ()</TD
+><TD CLASS="rdoc"
+>This is the result type
+</TD
+></TR
+><TR
+><TD CLASS="ndoc" COLSPAN="2"
+>This is a function with documentation for each argument
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Al"
+></A
+><B
+>l</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: (Int, Int, Float)</TD
+><TD CLASS="rdoc"
+>takes a triple
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; Int</TD
+><TD CLASS="rdoc"
+>returns an <TT
+>Int</TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Am"
+></A
+><B
+>m</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: <A HREF="Test.html#t%3AR"
+>R</A
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AN1"
+>N1</A
+> ()</TD
+><TD CLASS="rdoc"
+>one of the arguments
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; IO Int</TD
+><TD CLASS="rdoc"
+>and the return value
+</TD
+></TR
+><TR
+><TD CLASS="ndoc" COLSPAN="2"
+>This function has some arg docs
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ao"
+></A
+><B
+>o</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: Float</TD
+><TD CLASS="rdoc"
+>The input float
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; IO Float</TD
+><TD CLASS="rdoc"
+>The output float
+</TD
+></TR
+><TR
+><TD CLASS="ndoc" COLSPAN="2"
+>A foreign import with argument docs
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="11"
+>A section
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="12"
+>A subsection
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> a literal line
+</PRE
+><P
+>$ a non <EM
+>literal</EM
+> line $
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Af%27"
+></A
+><B
+>f'</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>a function with a prime can be referred to as <TT
+><A HREF="Test.html#v%3Af%27"
+>f'</A
+></TT
+>
+ but f' doesn't get link'd 'f\''
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Test.html.ref b/tests/output/Test.html.ref
index 50df8e7e..38df4004 100644
--- a/tests/pre-2.0-tests/Test.html.ref
+++ b/tests/output/Test.html.ref
@@ -219,7 +219,7 @@
><TD CLASS="decl"
>= <A HREF="#v%3AA"
>A</A
-> Int Maybe Float</TD
+> Int (Maybe Float)</TD
></TR
><TR
><TD CLASS="decl"
@@ -909,9 +909,9 @@
><TD CLASS="decl"
>| <A HREF="#v%3AEx4"
>Ex4</A
-> <SPAN CLASS="keyword"
+> (<SPAN CLASS="keyword"
>forall</SPAN
-> a. a -&gt; a</TD
+> a. a -&gt; a)</TD
></TR
></TABLE
></TD
@@ -1050,7 +1050,7 @@
></A
><B
>A</B
-> Int Maybe Float</TD
+> Int (Maybe Float)</TD
><TD CLASS="rdoc"
>This comment describes the <TT
><A HREF="Test.html#v%3AA"
@@ -2812,9 +2812,9 @@ test2
></A
><B
>Ex4</B
-> <SPAN CLASS="keyword"
+> (<SPAN CLASS="keyword"
>forall</SPAN
-> a. a -&gt; a</TD
+> a. a -&gt; a)</TD
><TD CLASS="rdoc"
></TD
></TR
@@ -3097,7 +3097,7 @@ test2
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/TypeOperators.html b/tests/output/TypeOperators.html
new file mode 100644
index 00000000..9c0149dd
--- /dev/null
+++ b/tests/output/TypeOperators.html
@@ -0,0 +1,380 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>TypeOperators</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>TypeOperators</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>stuff
+</A
+></DT
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> a <A HREF="#t%3A%3A-%3A"
+>:-:</A
+> b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> (a <A HREF="#t%3A%3A%2B%3A"
+>:+:</A
+> b) c</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AOp"
+>Op</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AO"
+>O</A
+> g f a = <A HREF="#v%3AO"
+>O</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AunO"
+>unO</A
+> :: g (f a)</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AbiO"
+>biO</A
+> :: (g `<A HREF="TypeOperators.html#t%3AO"
+>O</A
+>` f) a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AFlip"
+>Flip</A
+> (~&gt;) b a = <A HREF="#v%3AFlip"
+>Flip</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AunFlip"
+>unFlip</A
+> :: a ~&gt; b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>stuff
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> a <A NAME="t%3A%3A-%3A"
+></A
+><B
+>:-:</B
+> b </TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> (a <A NAME="t%3A%3A%2B%3A"
+></A
+><B
+>:+:</B
+> b) c </TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AOp"
+></A
+><B
+>Op</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AO"
+></A
+><B
+>O</B
+> g f a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AO"
+></A
+><B
+>O</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AunO"
+></A
+><B
+>unO</B
+> :: g (f a)</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AbiO"
+></A
+><B
+>biO</B
+> :: (g `<A HREF="TypeOperators.html#t%3AO"
+>O</A
+>` f) a</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AFlip"
+></A
+><B
+>Flip</B
+> (~&gt;) b a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AFlip"
+></A
+><B
+>Flip</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AunFlip"
+></A
+><B
+>unFlip</B
+> :: a ~&gt; b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/extensions/TypeOperators.html.ref b/tests/output/TypeOperators.html.ref
index 1094536f..9c0149dd 100644
--- a/tests/extensions/TypeOperators.html.ref
+++ b/tests/output/TypeOperators.html.ref
@@ -372,7 +372,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/Visible.html b/tests/output/Visible.html
new file mode 100644
index 00000000..9ed7f264
--- /dev/null
+++ b/tests/output/Visible.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Visible</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Visible</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Avisible"
+></A
+><B
+>visible</B
+> :: Int -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Visible.html.ref b/tests/output/Visible.html.ref
index 9561baee..9ed7f264 100644
--- a/tests/pre-2.0-tests/Visible.html.ref
+++ b/tests/output/Visible.html.ref
@@ -80,7 +80,7 @@
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
-> version 2.0.0.0</TD
+> version 2.1.0</TD
></TR
></TABLE
></BODY
diff --git a/tests/output/doc-index.html b/tests/output/doc-index.html
new file mode 100644
index 00000000..95a06336
--- /dev/null
+++ b/tests/output/doc-index.html
@@ -0,0 +1,1104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+> (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD COLSPAN="2" STYLE="padding-top:5px;"
+><FORM onsubmit="full_search(); return false;" ACTION=""
+>Search: <INPUT ID="searchbox" onkeyup="quick_search()"
+> <INPUT VALUE="Search" TYPE="submit"
+> <SPAN ID="searchmsg"
+> </SPAN
+></FORM
+></TD
+></TR
+><TR
+><TD
+><TABLE ID="indexlist" CELLPADDING="0" CELLSPACING="5"
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>---&gt;</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>--&gt;</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>:+:</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#t%3A%3A%2B%3A"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>:-:</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#t%3A%3A-%3A"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>A</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bugs.html#t%3AA"
+>Bugs</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+>Bugs</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>3 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#t%3AA"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>4 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3AA"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>5 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AA"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>6 (Type/Class)</TD
+><TD CLASS="indexlinks"
+>B, <A HREF="A.html#t%3AA"
+>A</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>7 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+>B, A</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>a</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Aa"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>A1</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AA1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>A2</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AA2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>A3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AA3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>A4</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AA4"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>B</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#t%3AB"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3AB"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>3 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AB"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>b</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3Ab"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ab"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>B1</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AB1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>B2</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AB2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>B3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AB3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>B4</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AB4"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Bar</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug7.html#t%3ABar"
+>Bug7</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>biO</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#v%3AbiO"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>C</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#t%3AC"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3AC"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>3 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AC"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>C1</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AC1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>c1</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3Ac1"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>C2</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AC2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>c2</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3Ac2"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>C3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AC3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>C4</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AC4"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>D</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#t%3AD"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3AD"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>3 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AD"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>d</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ad"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>d1</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3Ad1"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>E</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#t%3AE"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug6.html#v%3AE"
+>Bug6</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>3 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AE"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>e</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ae"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Ex</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AEx"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Ex1</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AEx1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Ex2</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AEx2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Ex3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AEx3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Ex4</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AEx4"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>F</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AF"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>f</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Af"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>f'</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Af%27"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>ff</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Aff"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>Flip</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#t%3AFlip"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#v%3AFlip"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>Foo</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug7.html#t%3AFoo"
+>Bug7</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+>Bug7</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>foo</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug4.html#v%3Afoo"
+>Bug4</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug3.html#v%3Afoo"
+>Bug3</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>g</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="NoLayout.html#v%3Ag"
+>NoLayout</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ag"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Hash</TD
+><TD CLASS="indexlinks"
+><A HREF="Hash.html#t%3AHash"
+>Hash</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>hash</TD
+><TD CLASS="indexlinks"
+><A HREF="Hash.html#v%3Ahash"
+>Hash</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>HashTable</TD
+><TD CLASS="indexlinks"
+><A HREF="Hash.html#t%3AHashTable"
+>Hash</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>hidden</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ahidden"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>insert</TD
+><TD CLASS="indexlinks"
+><A HREF="Hash.html#v%3Ainsert"
+>Hash</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>k</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ak"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>l</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Al"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>lookup</TD
+><TD CLASS="indexlinks"
+><A HREF="Hash.html#v%3Alookup"
+>Hash</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>m</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Am"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>main</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>n</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3An"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>N1</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AN1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>N2</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AN2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>N3</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AN3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>n3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3An3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>N4</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN4"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>N5</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN5"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AN5"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>n5</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3An5"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>N6</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN6"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AN6"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>n6</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3An6"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>N7</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AN7"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3AN7"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>n7</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3An7"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>new</TD
+><TD CLASS="indexlinks"
+><A HREF="Hash.html#v%3Anew"
+>Hash</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>O</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#t%3AO"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#v%3AO"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>o</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ao"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Op</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#t%3AOp"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>p</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ap"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>q</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Aq"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>R</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AR"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>r</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Ar"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>R1</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AR1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>s</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Function)</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3As"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>s1</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3As1"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>s2</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3As2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>s3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3As3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>T</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug1.html#t%3AT"
+>Bug1</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+>Bug1</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>3 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AT"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry" COLSPAN="2"
+>t</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>1 (Function)</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexannot"
+>2 (Function)</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3At"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>T2</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AT2"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>T3</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AT3"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>T4</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AT4"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>T5</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AT5"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>T6</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#t%3AT6"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>TFree</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Typ</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug8.html#t%3ATyp"
+>Bug8</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>Type</TD
+><TD CLASS="indexlinks"
+>Bug8</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>u</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Au"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>unFlip</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#v%3AunFlip"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>unO</TD
+><TD CLASS="indexlinks"
+><A HREF="TypeOperators.html#v%3AunO"
+>TypeOperators</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>v</TD
+><TD CLASS="indexlinks"
+><A HREF="Test.html#v%3Av"
+>Test</A
+></TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>visible</TD
+><TD CLASS="indexlinks"
+><A HREF="Visible.html#v%3Avisible"
+>Visible</A
+>, Test</TD
+></TR
+><TR CLASS="indexrow"
+><TD CLASS="indexentry"
+>x</TD
+><TD CLASS="indexlinks"
+><A HREF="Bug2.html#v%3Ax"
+>Bug2</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/output/index.html b/tests/output/index.html
new file mode 100644
index 00000000..6210c6e3
--- /dev/null
+++ b/tests/output/index.html
@@ -0,0 +1,208 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+></TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Modules</TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="A.html"
+>A</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="B.html"
+>B</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug1.html"
+>Bug1</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug2.html"
+>Bug2</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug3.html"
+>Bug3</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug4.html"
+>Bug4</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug6.html"
+>Bug6</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug7.html"
+>Bug7</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bug8.html"
+>Bug8</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Bugs.html"
+>Bugs</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Hash.html"
+>Hash</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="NoLayout.html"
+>NoLayout</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Test.html"
+>Test</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="TypeOperators.html"
+>TypeOperators</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 50em"
+><A HREF="Visible.html"
+>Visible</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/runtests.hs b/tests/runtests.hs
index 0f815294..ac6b293e 100644
--- a/tests/runtests.hs
+++ b/tests/runtests.hs
@@ -8,12 +8,13 @@ import Control.Monad
import Text.Printf
import Text.Regex
+
main = do
args <- getArgs
when (null args) $ error "You must give the path to the GHC lib dir as an argument"
putStrLn "Running tests..."
let libdir = head args
- walkDirs libdir "."
+ test libdir
putStrLn "All tests passed!"
@@ -21,20 +22,14 @@ haddockEq file1 file2 = (stripLinks file1) == (stripLinks file2)
where
stripLinks f = subRegex (mkRegexWithOpts "<A HREF=[^>]*>" False False) f "<A HREF=\"\">"
-
-allModules dir = do
- contents <- getDirectoryContents dir
- return $ filter ((==) ".hs" . takeExtension) contents
-
-
check modules = do
forM_ modules $ \mod -> do
let outfile = "output" </> (dropExtension mod ++ ".html")
- let reffile = dropExtension mod ++ ".html.ref"
+ let reffile = "tests" </> dropExtension mod ++ ".html.ref"
b <- doesFileExist reffile
if b
then do
- copyFile reffile ("output" </> reffile)
+ copyFile reffile ("output" </> takeFileName reffile)
out <- readFile outfile
ref <- readFile reffile
if not $ haddockEq out ref
@@ -48,20 +43,11 @@ check modules = do
putStrLn $ "Pass: " ++ mod ++ " (no .ref file)"
-walkDirs libdir basedir = do
- contents <- getDirectoryContents basedir
- dirs <- filterM doesDirectoryExist .
- map (basedir </>) .
- filter (`notElem` [".", "..", "output"]) $ contents
- mapM_ (testDir libdir) dirs
-
-
-testDir libdir dir = do
- mods <- allModules dir
- let mods' = map (dir </>) mods
- let outdir = "output" </> dir
- createDirectoryIfMissing True outdir
- code <- system $ printf "../dist/build/haddock/haddock -B %s -w -o %s -h --optghc=-fglasgow-exts --optghc=-w %s" libdir outdir (unwords mods')
+test libdir = do
+ contents <- getDirectoryContents "tests"
+ let mods = filter ((==) ".hs" . takeExtension) contents
+ let outdir = "output"
+ let mods' = map ("tests" </>) mods
+ code <- system $ printf "haddock -B %s -w -o %s -h --optghc=-fglasgow-exts --optghc=-w %s" libdir outdir (unwords mods')
unless (code == ExitSuccess) $ error "Haddock run failed! Exiting."
- check mods'
- walkDirs libdir dir
+ check mods
diff --git a/tests/pre-2.0-tests/A.hs b/tests/tests/A.hs
index 4a344a24..4a344a24 100644
--- a/tests/pre-2.0-tests/A.hs
+++ b/tests/tests/A.hs
diff --git a/tests/tests/A.html.ref b/tests/tests/A.html.ref
new file mode 100644
index 00000000..3a3c137b
--- /dev/null
+++ b/tests/tests/A.html.ref
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>A</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>A</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AA"
+></A
+><B
+>A</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/B.hs b/tests/tests/B.hs
index 3a31507e..3a31507e 100644
--- a/tests/pre-2.0-tests/B.hs
+++ b/tests/tests/B.hs
diff --git a/tests/tests/B.html.ref b/tests/tests/B.html.ref
new file mode 100644
index 00000000..a69e45ad
--- /dev/null
+++ b/tests/tests/B.html.ref
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>B</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>B</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="A.html"
+>A</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug1.hs b/tests/tests/Bug1.hs
index af1ed4d3..af1ed4d3 100644
--- a/tests/pre-2.0-tests/Bug1.hs
+++ b/tests/tests/Bug1.hs
diff --git a/tests/tests/Bug1.html.ref b/tests/tests/Bug1.html.ref
new file mode 100644
index 00000000..462f088b
--- /dev/null
+++ b/tests/tests/Bug1.html.ref
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug1</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug1</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT"
+>T</A
+> = <A HREF="#v%3AT"
+>T</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT"
+></A
+><B
+>T</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>We should have different anchors for constructors and types/classes. This
+ hyperlink should point to the type constructor by default: <TT
+><A HREF="Bug1.html#t%3AT"
+>T</A
+></TT
+>.
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AT"
+></A
+><B
+>T</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug2.hs b/tests/tests/Bug2.hs
index 9121922e..9121922e 100644
--- a/tests/pre-2.0-tests/Bug2.hs
+++ b/tests/tests/Bug2.hs
diff --git a/tests/tests/Bug2.html.ref b/tests/tests/Bug2.html.ref
new file mode 100644
index 00000000..aa9d6647
--- /dev/null
+++ b/tests/tests/Bug2.html.ref
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug2</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug2</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ax"
+></A
+><B
+>x</B
+> :: <A HREF="A.html#t%3AA"
+>A</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug3.hs b/tests/tests/Bug3.hs
index 67e57892..67e57892 100644
--- a/tests/pre-2.0-tests/Bug3.hs
+++ b/tests/tests/Bug3.hs
diff --git a/tests/tests/Bug3.html.ref b/tests/tests/Bug3.html.ref
new file mode 100644
index 00000000..60f4b890
--- /dev/null
+++ b/tests/tests/Bug3.html.ref
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug3</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug3</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Afoo"
+>foo</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Afoo"
+></A
+><B
+>foo</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>/multi-line
+ emphasis/
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug4.hs b/tests/tests/Bug4.hs
index 425a77aa..425a77aa 100644
--- a/tests/pre-2.0-tests/Bug4.hs
+++ b/tests/tests/Bug4.hs
diff --git a/tests/tests/Bug4.html.ref b/tests/tests/Bug4.html.ref
new file mode 100644
index 00000000..c2921742
--- /dev/null
+++ b/tests/tests/Bug4.html.ref
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug4</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug4</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Afoo"
+>foo</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Afoo"
+></A
+><B
+>foo</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>don't use apostrophe's in the wrong place's
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug6.hs b/tests/tests/Bug6.hs
index 498983df..498983df 100644
--- a/tests/pre-2.0-tests/Bug6.hs
+++ b/tests/tests/Bug6.hs
diff --git a/tests/tests/Bug6.html.ref b/tests/tests/Bug6.html.ref
new file mode 100644
index 00000000..806f5470
--- /dev/null
+++ b/tests/tests/Bug6.html.ref
@@ -0,0 +1,482 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug6</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug6</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Exporting records.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AA"
+>A</A
+> = <A HREF="#v%3AA"
+>A</A
+> Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AB"
+>B</A
+> = <A HREF="#v%3AB"
+>B</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ab"
+>b</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ab"
+>b</A
+> :: <A HREF="Bug6.html#t%3AB"
+>B</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AC"
+>C</A
+> = <A HREF="#v%3AC"
+>C</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ac1"
+>c1</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ac2"
+>c2</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AD"
+>D</A
+> = <A HREF="#v%3AD"
+>D</A
+> Int Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AE"
+>E</A
+> = <A HREF="#v%3AE"
+>E</A
+> Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AA"
+></A
+><B
+>A</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This record is exported without its field
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+> Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AB"
+></A
+><B
+>B</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>.. with its field, but the field is named separately in the export list
+ (should still be visible as a field name)
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB"
+></A
+><B
+>B</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ab"
+></A
+><B
+>b</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ab"
+></A
+><B
+>b</B
+> :: <A HREF="Bug6.html#t%3AB"
+>B</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AC"
+></A
+><B
+>C</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>.. with fields names as subordinate names in the export
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC"
+></A
+><B
+>C</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ac1"
+></A
+><B
+>c1</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ac2"
+></A
+><B
+>c2</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AD"
+></A
+><B
+>D</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>.. with only some of the fields exported (we can't handle this one -
+ how do we render the declaration?)
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AD"
+></A
+><B
+>D</B
+> Int Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AE"
+></A
+><B
+>E</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>a newtype with a field
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AE"
+></A
+><B
+>E</B
+> Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug7.hs b/tests/tests/Bug7.hs
index 8cf57914..8cf57914 100644
--- a/tests/pre-2.0-tests/Bug7.hs
+++ b/tests/tests/Bug7.hs
diff --git a/tests/tests/Bug7.html.ref b/tests/tests/Bug7.html.ref
new file mode 100644
index 00000000..788ae3a9
--- /dev/null
+++ b/tests/tests/Bug7.html.ref
@@ -0,0 +1,242 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug7</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug7</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This module caused a duplicate instance in the documentation for the Foo
+ type.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AFoo"
+>Foo</A
+> = <A HREF="#v%3AFoo"
+>Foo</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3ABar"
+>Bar</A
+> x y </TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AFoo"
+></A
+><B
+>Foo</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>The Foo datatype
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AFoo"
+></A
+><B
+>Foo</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Foo')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:Foo" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="Bug7.html#t%3ABar"
+>Bar</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3ABar"
+></A
+><B
+>Bar</B
+> x y </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>The Bar class
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Bar')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:Bar" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="Bug7.html#t%3ABar"
+>Bar</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+> <A HREF="Bug7.html#t%3AFoo"
+>Foo</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Bug8.hs b/tests/tests/Bug8.hs
index 0f279c29..0f279c29 100644
--- a/tests/pre-2.0-tests/Bug8.hs
+++ b/tests/tests/Bug8.hs
diff --git a/tests/tests/Bug8.html.ref b/tests/tests/Bug8.html.ref
new file mode 100644
index 00000000..d6be9969
--- /dev/null
+++ b/tests/tests/Bug8.html.ref
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bug8</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bug8</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ATyp"
+></A
+><B
+>Typ</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AType"
+></A
+><B
+>Type</B
+> (String, [<A HREF="Bug8.html#t%3ATyp"
+>Typ</A
+>])</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ATFree"
+></A
+><B
+>TFree</B
+> (String, [String])</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/tests/Bugs.hs b/tests/tests/Bugs.hs
new file mode 100644
index 00000000..8e1f0079
--- /dev/null
+++ b/tests/tests/Bugs.hs
@@ -0,0 +1,3 @@
+module Bugs where
+
+data A a = A a (a -> Int)
diff --git a/tests/tests/Bugs.html.ref b/tests/tests/Bugs.html.ref
new file mode 100644
index 00000000..f9a3522b
--- /dev/null
+++ b/tests/tests/Bugs.html.ref
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Bugs</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Bugs</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AA"
+></A
+><B
+>A</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+> a (a -&gt; Int)</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Hash.hs b/tests/tests/Hash.hs
index 7d6506f9..7d6506f9 100644
--- a/tests/pre-2.0-tests/Hash.hs
+++ b/tests/tests/Hash.hs
diff --git a/tests/tests/Hash.html.ref b/tests/tests/Hash.html.ref
new file mode 100644
index 00000000..5e03b2ef
--- /dev/null
+++ b/tests/tests/Hash.html.ref
@@ -0,0 +1,412 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Hash</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Hash</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>The <TT
+>HashTable</TT
+> type
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#2"
+>Operations on <TT
+>HashTable</TT
+>s
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#3"
+>The <TT
+>Hash</TT
+> class
+</A
+></DT
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Implementation of fixed-size hash tables, with a type
+ class for constructing hash values for structured types.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AHashTable"
+>HashTable</A
+> key val</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Anew"
+>new</A
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; Int -&gt; IO (<A HREF="Hash.html#t%3AHashTable"
+>HashTable</A
+> key val)</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ainsert"
+>insert</A
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; key -&gt; val -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Alookup"
+>lookup</A
+> :: <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key =&gt; key -&gt; IO (Maybe val)</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AHash"
+>Hash</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ahash"
+>hash</A
+> :: a -&gt; Int</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>The <TT
+>HashTable</TT
+> type
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AHashTable"
+></A
+><B
+>HashTable</B
+> key val </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A hash table with keys of type <TT
+>key</TT
+> and values of type <TT
+>val</TT
+>.
+ The type <TT
+>key</TT
+> should be an instance of <TT
+>Eq</TT
+>.
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="2"
+>Operations on <TT
+>HashTable</TT
+>s
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Anew"
+></A
+><B
+>new</B
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; Int -&gt; IO (<A HREF="Hash.html#t%3AHashTable"
+>HashTable</A
+> key val)</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Builds a new hash table with a given size
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ainsert"
+></A
+><B
+>insert</B
+> :: (Eq key, <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key) =&gt; key -&gt; val -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Inserts a new element into the hash table
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Alookup"
+></A
+><B
+>lookup</B
+> :: <A HREF="Hash.html#t%3AHash"
+>Hash</A
+> key =&gt; key -&gt; IO (Maybe val)</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Looks up a key in the hash table, returns <TT
+><TT
+>Just</TT
+> val</TT
+> if the key
+ was found, or <TT
+>Nothing</TT
+> otherwise.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="3"
+>The <TT
+>Hash</TT
+> class
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AHash"
+></A
+><B
+>Hash</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A class of types which can be hashed.
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ahash"
+></A
+><B
+>hash</B
+> :: a -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>hashes the value of type <TT
+>a</TT
+> into an <TT
+>Int</TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Hidden.hs b/tests/tests/Hidden.hs
index e46fc37f..e46fc37f 100644
--- a/tests/pre-2.0-tests/Hidden.hs
+++ b/tests/tests/Hidden.hs
diff --git a/tests/pre-2.0-tests/NoLayout.hs b/tests/tests/NoLayout.hs
index ac8e58bb..ac8e58bb 100644
--- a/tests/pre-2.0-tests/NoLayout.hs
+++ b/tests/tests/NoLayout.hs
diff --git a/tests/tests/NoLayout.html.ref b/tests/tests/NoLayout.html.ref
new file mode 100644
index 00000000..4709e907
--- /dev/null
+++ b/tests/tests/NoLayout.html.ref
@@ -0,0 +1,113 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>NoLayout</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>NoLayout</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ag"
+>g</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ag"
+></A
+><B
+>g</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>the class C
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Test.hs b/tests/tests/Test.hs
index 230f32d8..230f32d8 100644
--- a/tests/pre-2.0-tests/Test.hs
+++ b/tests/tests/Test.hs
diff --git a/tests/tests/Test.html.ref b/tests/tests/Test.html.ref
new file mode 100644
index 00000000..38df4004
--- /dev/null
+++ b/tests/tests/Test.html.ref
@@ -0,0 +1,3105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Test</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Test</FONT
+></TD
+><TD ALIGN="right"
+><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="infohead"
+>Portability</TD
+><TD CLASS="infoval"
+>portable</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Stability</TD
+><TD CLASS="infoval"
+>provisional</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Maintainer</TD
+><TD CLASS="infoval"
+>libraries@haskell.org</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>Type declarations
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#2"
+>Data types
+</A
+></DT
+><DT
+><A HREF="#3"
+>Records
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#4"
+>Class declarations
+</A
+></DT
+><DT
+><A HREF="#5"
+>Function types
+</A
+></DT
+><DT
+><A HREF="#6"
+>Auxiliary stuff
+</A
+></DT
+><DT
+><A HREF="#7"
+>A hidden module
+</A
+></DT
+><DT
+><A HREF="#8"
+>A visible module
+</A
+></DT
+><DT
+><A HREF="#9"
+>Existential / Universal types
+</A
+></DT
+><DT
+><A HREF="#10"
+>Type signatures with argument docs
+</A
+></DT
+><DT
+><A HREF="#11"
+>A section
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#12"
+>A subsection
+</A
+></DT
+></DL
+></DD
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This module illustrates &amp; tests most of the features of Haddock.
+ Testing references from the description: <TT
+><A HREF="Test.html#t%3AT"
+>T</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Af"
+>f</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Ag"
+>g</A
+></TT
+>, <TT
+><A HREF="Visible.html#v%3Avisible"
+>visible</A
+></TT
+>.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT"
+>T</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA"
+>A</A
+> Int (Maybe Float)</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB"
+>B</A
+> (<A HREF="Test.html#t%3AT"
+>T</A
+> a b, <A HREF="Test.html#t%3AT"
+>T</A
+> Int Float)</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT2"
+>T2</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT3"
+>T3</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA1"
+>A1</A
+> a</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB1"
+>B1</A
+> b</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT4"
+>T4</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA2"
+>A2</A
+> a</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB2"
+>B2</A
+> b</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT5"
+>T5</A
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA3"
+>A3</A
+> a</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB3"
+>B3</A
+> b</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AT6"
+>T6</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AA4"
+>A4</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AB4"
+>B4</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AC4"
+>C4</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN1"
+>N1</A
+> a = <A HREF="#v%3AN1"
+>N1</A
+> a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN2"
+>N2</A
+> a b = <A HREF="#v%3AN2"
+>N2</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An"
+>n</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN3"
+>N3</A
+> a b = <A HREF="#v%3AN3"
+>N3</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An3"
+>n3</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AN4"
+>N4</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN5"
+>N5</A
+> a b = <A HREF="#v%3AN5"
+>N5</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An5"
+>n5</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN6"
+>N6</A
+> a b = <A HREF="#v%3AN6"
+>N6</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An6"
+>n6</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AN7"
+>N7</A
+> a b = <A HREF="#v%3AN7"
+>N7</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3An7"
+>n7</A
+> :: a b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AR"
+>R</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3AC1"
+>C1</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ap"
+>p</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Aq"
+>q</A
+> :: <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Ar"
+>r</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As"
+>s</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AC2"
+>C2</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3At"
+>t</A
+> :: T1 -&gt; (<A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int) -&gt; (<A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool) -&gt; (<A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float) -&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () ()</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Au"
+>u</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Av"
+>v</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AR1"
+>R1</A
+> = <A HREF="#v%3AC3"
+>C3</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As1"
+>s1</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As2"
+>s2</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3As3"
+>s3</A
+> :: Int</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ap"
+>p</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aq"
+>q</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Au"
+>u</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="Test.html#t%3AD"
+>D</A
+> a =&gt; <A HREF="#t%3AC"
+>C</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aa"
+>a</A
+> :: IO a</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ab"
+>b</A
+> :: [a]</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AD"
+>D</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ad"
+>d</A
+> :: <A HREF="Test.html#t%3AT"
+>T</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ae"
+>e</A
+> :: (a, a)</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AE"
+>E</A
+> a </TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="#t%3AF"
+>F</A
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aff"
+>ff</A
+> :: a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aa"
+>a</A
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Af"
+>f</A
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; a -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ag"
+>g</A
+> :: Int -&gt; IO CInt</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ahidden"
+>hidden</A
+> :: Int -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="Visible.html"
+>Visible</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AEx"
+>Ex</A
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> b =&gt; <A HREF="#v%3AEx1"
+>Ex1</A
+> b</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="#v%3AEx2"
+>Ex2</A
+> b</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; <A HREF="#v%3AEx3"
+>Ex3</A
+> b</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3AEx4"
+>Ex4</A
+> (<SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a)</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ak"
+>k</A
+> :: <A HREF="Test.html#t%3AT"
+>T</A
+> () () -&gt; <A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int -&gt; <A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool -&gt; <A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float -&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () () -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Al"
+>l</A
+> :: (Int, Int, Float) -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Am"
+>m</A
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; <A HREF="Test.html#t%3AN1"
+>N1</A
+> () -&gt; IO Int</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Ao"
+>o</A
+> :: Float -&gt; IO Float</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Af%27"
+>f'</A
+> :: Int</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>Type declarations
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="2"
+>Data types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT"
+></A
+><B
+>T</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This comment applies to the <EM
+>following</EM
+> declaration
+ and it continues until the next non-comment line
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA"
+></A
+><B
+>A</B
+> Int (Maybe Float)</TD
+><TD CLASS="rdoc"
+>This comment describes the <TT
+><A HREF="Test.html#v%3AA"
+>A</A
+></TT
+> constructor
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB"
+></A
+><B
+>B</B
+> (<A HREF="Test.html#t%3AT"
+>T</A
+> a b, <A HREF="Test.html#t%3AT"
+>T</A
+> Int Float)</TD
+><TD CLASS="rdoc"
+>This comment describes the <TT
+><A HREF="Test.html#v%3AB"
+>B</A
+></TT
+> constructor
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT2"
+></A
+><B
+>T2</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>An abstract data declaration
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT3"
+></A
+><B
+>T3</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A data declaration with no documentation annotations on the constructors
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA1"
+></A
+><B
+>A1</B
+> a</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB1"
+></A
+><B
+>B1</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT4"
+></A
+><B
+>T4</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA2"
+></A
+><B
+>A2</B
+> a</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB2"
+></A
+><B
+>B2</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT5"
+></A
+><B
+>T5</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA3"
+></A
+><B
+>A3</B
+> a</TD
+><TD CLASS="rdoc"
+>documents <TT
+><A HREF="Test.html#v%3AA3"
+>A3</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB3"
+></A
+><B
+>B3</B
+> b</TD
+><TD CLASS="rdoc"
+>documents <TT
+><A HREF="Test.html#v%3AB3"
+>B3</A
+></TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AT6"
+></A
+><B
+>T6</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>Testing alternative comment styles
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AA4"
+></A
+><B
+>A4</B
+></TD
+><TD CLASS="rdoc"
+>This is the doc for <TT
+><A HREF="Test.html#v%3AA4"
+>A4</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AB4"
+></A
+><B
+>B4</B
+></TD
+><TD CLASS="rdoc"
+>This is the doc for <TT
+><A HREF="Test.html#v%3AB4"
+>B4</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC4"
+></A
+><B
+>C4</B
+></TD
+><TD CLASS="rdoc"
+>This is the doc for <TT
+><A HREF="Test.html#v%3AC4"
+>C4</A
+></TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN1"
+></A
+><B
+>N1</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A newtype
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN1"
+></A
+><B
+>N1</B
+> a</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN2"
+></A
+><B
+>N2</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A newtype with a fieldname
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN2"
+></A
+><B
+>N2</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An"
+></A
+><B
+>n</B
+> :: a b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN3"
+></A
+><B
+>N3</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A newtype with a fieldname, documentation on the field
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN3"
+></A
+><B
+>N3</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An3"
+></A
+><B
+>n3</B
+> :: a b</TD
+><TD CLASS="rdoc"
+>this is the <TT
+><A HREF="Test.html#v%3An3"
+>n3</A
+></TT
+> field
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AN4"
+></A
+><B
+>N4</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>An abstract newtype - we show this one as data rather than newtype because
+ the difference isn't visible to the programmer for an abstract type.
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN5"
+></A
+><B
+>N5</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN5"
+></A
+><B
+>N5</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An5"
+></A
+><B
+>n5</B
+> :: a b</TD
+><TD CLASS="rdoc"
+>no docs on the datatype or the constructor
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN6"
+></A
+><B
+>N6</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN6"
+></A
+><B
+>N6</B
+></TD
+><TD CLASS="rdoc"
+>docs on the constructor only
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An6"
+></A
+><B
+>n6</B
+> :: a b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AN7"
+></A
+><B
+>N7</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>docs on the newtype and the constructor
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AN7"
+></A
+><B
+>N7</B
+></TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#t%3AN7"
+>N7</A
+></TT
+> constructor
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3An7"
+></A
+><B
+>n7</B
+> :: a b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="3"
+>Records
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AR"
+></A
+><B
+>R</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This is the documentation for the <TT
+><A HREF="Test.html#t%3AR"
+>R</A
+></TT
+> record, which has four fields,
+ <TT
+><A HREF="Test.html#v%3Ap"
+>p</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Aq"
+>q</A
+></TT
+>, <TT
+><A HREF="Test.html#v%3Ar"
+>r</A
+></TT
+>, and <TT
+><A HREF="Test.html#v%3As"
+>s</A
+></TT
+>.
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC1"
+></A
+><B
+>C1</B
+></TD
+><TD CLASS="rdoc"
+>This is the <TT
+><A HREF="Test.html#v%3AC1"
+>C1</A
+></TT
+> record constructor, with the following fields:
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ap"
+></A
+><B
+>p</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Ap"
+>p</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Aq"
+></A
+><B
+>q</B
+> :: <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+><TD CLASS="rdoc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Aq"
+>q</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Ar"
+></A
+><B
+>r</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>This comment applies to both <TT
+><A HREF="Test.html#v%3Ar"
+>r</A
+></TT
+> and <TT
+><A HREF="Test.html#v%3As"
+>s</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As"
+></A
+><B
+>s</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>This comment applies to both <TT
+><A HREF="Test.html#v%3Ar"
+>r</A
+></TT
+> and <TT
+><A HREF="Test.html#v%3As"
+>s</A
+></TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC2"
+></A
+><B
+>C2</B
+></TD
+><TD CLASS="rdoc"
+>This is the <TT
+><A HREF="Test.html#v%3AC2"
+>C2</A
+></TT
+> record constructor, also with some fields:
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3At"
+></A
+><B
+>t</B
+> :: T1 -&gt; (<A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int) -&gt; (<A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool) -&gt; (<A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float) -&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () ()</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Au"
+></A
+><B
+>u</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Av"
+></A
+><B
+>v</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AR1"
+></A
+><B
+>R1</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>Testing different record commenting styles
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AC3"
+></A
+><B
+>C3</B
+></TD
+><TD CLASS="rdoc"
+>This is the <TT
+><A HREF="Test.html#v%3AC3"
+>C3</A
+></TT
+> record constructor
+</TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As1"
+></A
+><B
+>s1</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#v%3As1"
+>s1</A
+></TT
+> record selector
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As2"
+></A
+><B
+>s2</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#v%3As2"
+>s2</A
+></TT
+> record selector
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3As3"
+></A
+><B
+>s3</B
+> :: Int</TD
+><TD CLASS="rdoc"
+>The <TT
+><A HREF="Test.html#v%3As3"
+>s3</A
+></TT
+> record selector
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>test that we can export record selectors on their own:
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ap"
+></A
+><B
+>p</B
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Ap"
+>p</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aq"
+></A
+><B
+>q</B
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; <SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>This comment applies to the <TT
+><A HREF="Test.html#v%3Aq"
+>q</A
+></TT
+> field
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Au"
+></A
+><B
+>u</B
+> :: <A HREF="Test.html#t%3AR"
+>R</A
+> -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="4"
+>Class declarations
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A HREF="Test.html#t%3AD"
+>D</A
+> a =&gt; <A NAME="t%3AC"
+></A
+><B
+>C</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This comment applies to the <EM
+>previous</EM
+> declaration (the <TT
+><A HREF="Test.html#t%3AC"
+>C</A
+></TT
+> class)
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aa"
+></A
+><B
+>a</B
+> :: IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>this is a description of the <TT
+><A HREF="Test.html#v%3Aa"
+>a</A
+></TT
+> method
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ab"
+></A
+><B
+>b</B
+> :: [a]</TD
+></TR
+><TR
+><TD CLASS="doc"
+>this is a description of the <TT
+><A HREF="Test.html#v%3Ab"
+>b</A
+></TT
+> method
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AD"
+></A
+><B
+>D</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This is a class declaration with no separate docs for the methods
+</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ad"
+></A
+><B
+>d</B
+> :: <A HREF="Test.html#t%3AT"
+>T</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ae"
+></A
+><B
+>e</B
+> :: (a, a)</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AE"
+></A
+><B
+>E</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>This is a class declaration with no methods (or no methods exported)
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> <A NAME="t%3AF"
+></A
+><B
+>F</B
+> a <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aff"
+></A
+><B
+>ff</B
+> :: a</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Test that we can export a class method on its own:
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aa"
+></A
+><B
+>a</B
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>this is a description of the <TT
+><A HREF="Test.html#v%3Aa"
+>a</A
+></TT
+> method
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="5"
+>Function types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Af"
+></A
+><B
+>f</B
+> :: <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; a -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>In a comment string we can refer to identifiers in scope with
+single quotes like this: <TT
+><A HREF="Test.html#t%3AT"
+>T</A
+></TT
+>, and we can refer to modules by
+using double quotes: <A HREF="Foo.html"
+>Foo</A
+>. We can add emphasis <EM
+>like this</EM
+>.
+</P
+><UL
+><LI
+> This is a bulleted list
+</LI
+><LI
+> This is the next item (different kind of bullet)
+</LI
+></UL
+><OL
+><LI
+> This is an ordered list
+</LI
+></OL
+><P
+>2. This is the next item (different kind of bullet)
+</P
+><PRE
+>
+ This is a block of code, which can include other markup: <TT
+><A HREF="Test.html#t%3AR"
+>R</A
+></TT
+>
+ formatting
+ is
+ significant
+</PRE
+><PRE
+> this is another block of code
+</PRE
+><P
+>We can also include URLs in documentation: <A HREF="http://www.haskell.org/"
+>http://www.haskell.org/</A
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ag"
+></A
+><B
+>g</B
+> :: Int -&gt; IO CInt</TD
+></TR
+><TR
+><TD CLASS="doc"
+>we can export foreign declarations too
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="6"
+>Auxiliary stuff
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>This is some documentation that is attached to a name ($aux1)
+ rather than a source declaration. The documentation may be
+ referred to in the export list using its name.
+</P
+><PRE
+> code block in named doc</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>This is some documentation that is attached to a name ($aux2)
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> code block on its own in named doc</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> code block on its own in named doc (after newline)</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>a nested, named doc comment
+</P
+><P
+>with a paragraph,
+</P
+><PRE
+> and a code block</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>test
+test1
+</PRE
+><PRE
+> test2
+ test3
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>
+test1
+test2
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>test3
+test4
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>
+test1
+test2
+</PRE
+><PRE
+>test3
+test4
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+>test3
+test4
+</PRE
+><PRE
+>
+test1
+test2
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>aux11:
+</P
+><PRE
+>test3
+test4
+</PRE
+><PRE
+>
+test1
+test2
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> foo
+</PRE
+><PRE
+> bar
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>This is some inline documentation in the export list
+</P
+><PRE
+> a code block using bird-tracks
+ each line must begin with &gt; (which isn't significant unless it
+ is at the beginning of the line).
+</PRE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="7"
+>A hidden module
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ahidden"
+></A
+><B
+>hidden</B
+> :: Int -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="8"
+>A visible module
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="Visible.html"
+>Visible</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>nested-style doc comments
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="9"
+>Existential / Universal types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AEx"
+></A
+><B
+>Ex</B
+> a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>A data-type using existential/universal types
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> b =&gt; <A NAME="v%3AEx1"
+></A
+><B
+>Ex1</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A NAME="v%3AEx2"
+></A
+><B
+>Ex2</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><SPAN CLASS="keyword"
+>forall</SPAN
+> b . <A HREF="Test.html#t%3AC"
+>C</A
+> a =&gt; <A NAME="v%3AEx3"
+></A
+><B
+>Ex3</B
+> b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AEx4"
+></A
+><B
+>Ex4</B
+> (<SPAN CLASS="keyword"
+>forall</SPAN
+> a. a -&gt; a)</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="10"
+>Type signatures with argument docs
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ak"
+></A
+><B
+>k</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: <A HREF="Test.html#t%3AT"
+>T</A
+> () ()</TD
+><TD CLASS="rdoc"
+>This argument has type <TT
+><A HREF="Test.html#t%3AT"
+>T</A
+></TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AT2"
+>T2</A
+> Int Int</TD
+><TD CLASS="rdoc"
+>This argument has type 'T2 Int Int'
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AT3"
+>T3</A
+> Bool Bool -&gt; <A HREF="Test.html#t%3AT4"
+>T4</A
+> Float Float</TD
+><TD CLASS="rdoc"
+>This argument has type <TT
+>T3 Bool Bool -&gt; T4 Float Float</TT
+>
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AT5"
+>T5</A
+> () ()</TD
+><TD CLASS="rdoc"
+>This argument has a very long description that should
+ hopefully cause some wrapping to happen when it is finally
+ rendered by Haddock in the generated HTML page.
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; IO ()</TD
+><TD CLASS="rdoc"
+>This is the result type
+</TD
+></TR
+><TR
+><TD CLASS="ndoc" COLSPAN="2"
+>This is a function with documentation for each argument
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Al"
+></A
+><B
+>l</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: (Int, Int, Float)</TD
+><TD CLASS="rdoc"
+>takes a triple
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; Int</TD
+><TD CLASS="rdoc"
+>returns an <TT
+>Int</TT
+>
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Am"
+></A
+><B
+>m</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: <A HREF="Test.html#t%3AR"
+>R</A
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; <A HREF="Test.html#t%3AN1"
+>N1</A
+> ()</TD
+><TD CLASS="rdoc"
+>one of the arguments
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; IO Int</TD
+><TD CLASS="rdoc"
+>and the return value
+</TD
+></TR
+><TR
+><TD CLASS="ndoc" COLSPAN="2"
+>This function has some arg docs
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Ao"
+></A
+><B
+>o</B
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+>:: Float</TD
+><TD CLASS="rdoc"
+>The input float
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+>-&gt; IO Float</TD
+><TD CLASS="rdoc"
+>The output float
+</TD
+></TR
+><TR
+><TD CLASS="ndoc" COLSPAN="2"
+>A foreign import with argument docs
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="11"
+>A section
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="12"
+>A subsection
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><PRE
+> a literal line
+</PRE
+><P
+>$ a non <EM
+>literal</EM
+> line $
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Af%27"
+></A
+><B
+>f'</B
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="doc"
+>a function with a prime can be referred to as <TT
+><A HREF="Test.html#v%3Af%27"
+>f'</A
+></TT
+>
+ but f' doesn't get link'd 'f\''
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/extensions/TypeOperators.hs b/tests/tests/TypeOperators.hs
index aa0fbe8c..aa0fbe8c 100644
--- a/tests/extensions/TypeOperators.hs
+++ b/tests/tests/TypeOperators.hs
diff --git a/tests/tests/TypeOperators.html.ref b/tests/tests/TypeOperators.html.ref
new file mode 100644
index 00000000..9c0149dd
--- /dev/null
+++ b/tests/tests/TypeOperators.html.ref
@@ -0,0 +1,380 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>TypeOperators</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>TypeOperators</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>stuff
+</A
+></DT
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> a <A HREF="#t%3A%3A-%3A"
+>:-:</A
+> b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> (a <A HREF="#t%3A%3A%2B%3A"
+>:+:</A
+> b) c</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AOp"
+>Op</A
+> a b</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AO"
+>O</A
+> g f a = <A HREF="#v%3AO"
+>O</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AunO"
+>unO</A
+> :: g (f a)</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AbiO"
+>biO</A
+> :: (g `<A HREF="TypeOperators.html#t%3AO"
+>O</A
+>` f) a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A HREF="#t%3AFlip"
+>Flip</A
+> (~&gt;) b a = <A HREF="#v%3AFlip"
+>Flip</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AunFlip"
+>unFlip</A
+> :: a ~&gt; b</TD
+></TR
+></TABLE
+>}</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>stuff
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> a <A NAME="t%3A%3A-%3A"
+></A
+><B
+>:-:</B
+> b </TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> (a <A NAME="t%3A%3A%2B%3A"
+></A
+><B
+>:+:</B
+> b) c </TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AOp"
+></A
+><B
+>Op</B
+> a b </TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AO"
+></A
+><B
+>O</B
+> g f a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AO"
+></A
+><B
+>O</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AunO"
+></A
+><B
+>unO</B
+> :: g (f a)</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AbiO"
+></A
+><B
+>biO</B
+> :: (g `<A HREF="TypeOperators.html#t%3AO"
+>O</A
+>` f) a</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>newtype</SPAN
+> <A NAME="t%3AFlip"
+></A
+><B
+>Flip</B
+> (~&gt;) b a </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AFlip"
+></A
+><B
+>Flip</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AunFlip"
+></A
+><B
+>unFlip</B
+> :: a ~&gt; b</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/tests/pre-2.0-tests/Visible.hs b/tests/tests/Visible.hs
index cad71931..cad71931 100644
--- a/tests/pre-2.0-tests/Visible.hs
+++ b/tests/tests/Visible.hs
diff --git a/tests/tests/Visible.html.ref b/tests/tests/Visible.html.ref
new file mode 100644
index 00000000..9ed7f264
--- /dev/null
+++ b/tests/tests/Visible.html.ref
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Visible</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+></TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Visible</FONT
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Avisible"
+></A
+><B
+>visible</B
+> :: Int -&gt; Int</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 2.1.0</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>