aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--.travis.yml11
-rw-r--r--CHANGES41
-rw-r--r--README.md (renamed from README)43
-rw-r--r--doc/README.md (renamed from doc/README)13
-rw-r--r--doc/haddock.xml97
-rw-r--r--driver/Main.hs28
-rw-r--r--haddock-api/haddock-api.cabal37
-rw-r--r--haddock-api/resources/html/Ocean.std-theme/ocean.css71
-rw-r--r--haddock-api/resources/html/frames.html2
-rw-r--r--haddock-api/resources/html/haddock-util.js24
-rw-r--r--haddock-api/resources/html/highlight.js27
-rw-r--r--haddock-api/resources/html/solarized.css55
-rw-r--r--haddock-api/src/Haddock.hs106
-rw-r--r--haddock-api/src/Haddock/Backends/HaddockDB.hs18
-rw-r--r--haddock-api/src/Haddock/Backends/Hoogle.hs109
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker.hs64
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs185
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs204
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs189
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs85
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs68
-rw-r--r--haddock-api/src/Haddock/Backends/LaTeX.hs21
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs3
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs173
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs12
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Layout.hs89
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Names.hs21
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Themes.hs2
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Utils.hs31
-rw-r--r--haddock-api/src/Haddock/Convert.hs60
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs1
-rw-r--r--haddock-api/src/Haddock/Interface/AttachInstances.hs28
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs46
-rw-r--r--haddock-api/src/Haddock/Interface/LexParseRn.hs65
-rw-r--r--haddock-api/src/Haddock/Interface/ParseModuleHeader.hs1
-rw-r--r--haddock-api/src/Haddock/Interface/Rename.hs43
-rw-r--r--haddock-api/src/Haddock/Interface/Specialize.hs406
-rw-r--r--haddock-api/src/Haddock/InterfaceFile.hs9
-rw-r--r--haddock-api/src/Haddock/Options.hs9
-rw-r--r--haddock-api/src/Haddock/Syb.hs55
-rw-r--r--haddock-api/src/Haddock/Types.hs116
-rw-r--r--haddock-api/src/Haddock/Version.hs2
-rw-r--r--haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs98
-rw-r--r--haddock-api/test/Spec.hs1
-rw-r--r--haddock-library/LICENSE4
-rw-r--r--haddock-library/haddock-library.cabal4
-rw-r--r--haddock-library/src/Documentation/Haddock/Parser.hs95
-rw-r--r--haddock-library/test/Documentation/Haddock/ParserSpec.hs24
-rw-r--r--haddock.cabal24
-rw-r--r--html-test/README.markdown2
-rw-r--r--html-test/ref/A.html18
-rw-r--r--html-test/ref/AdvanceTypes.html97
-rw-r--r--html-test/ref/B.html12
-rw-r--r--html-test/ref/Bold.html6
-rw-r--r--html-test/ref/Bug1.html8
-rw-r--r--html-test/ref/Bug195.html138
-rw-r--r--html-test/ref/Bug2.html6
-rw-r--r--html-test/ref/Bug201.html8
-rw-r--r--html-test/ref/Bug253.html99
-rw-r--r--html-test/ref/Bug26.html38
-rw-r--r--html-test/ref/Bug294.html82
-rw-r--r--html-test/ref/Bug298.html14
-rw-r--r--html-test/ref/Bug3.html6
-rw-r--r--html-test/ref/Bug308.html8
-rw-r--r--html-test/ref/Bug308CrossModule.html6
-rw-r--r--html-test/ref/Bug310.html6
-rw-r--r--html-test/ref/Bug313.html8
-rw-r--r--html-test/ref/Bug335.html16
-rw-r--r--html-test/ref/Bug387.html (renamed from html-test/ref/Ticket253_2.html)76
-rw-r--r--html-test/ref/Bug4.html6
-rw-r--r--html-test/ref/Bug6.html90
-rw-r--r--html-test/ref/Bug7.html58
-rw-r--r--html-test/ref/Bug8.html24
-rw-r--r--html-test/ref/Bug85.html16
-rw-r--r--html-test/ref/BugDeprecated.html16
-rw-r--r--html-test/ref/BugExportHeadings.html16
-rw-r--r--html-test/ref/Bugs.html8
-rw-r--r--html-test/ref/CrossPackageDocs.html2
-rw-r--r--html-test/ref/DeprecatedClass.html12
-rw-r--r--html-test/ref/DeprecatedData.html16
-rw-r--r--html-test/ref/DeprecatedFunction.html8
-rw-r--r--html-test/ref/DeprecatedFunction2.html6
-rw-r--r--html-test/ref/DeprecatedFunction3.html6
-rw-r--r--html-test/ref/DeprecatedModule.html6
-rw-r--r--html-test/ref/DeprecatedModule2.html6
-rw-r--r--html-test/ref/DeprecatedNewtype.html12
-rw-r--r--html-test/ref/DeprecatedReExport.html6
-rw-r--r--html-test/ref/DeprecatedRecord.html62
-rw-r--r--html-test/ref/DeprecatedTypeFamily.html8
-rw-r--r--html-test/ref/DeprecatedTypeSynonym.html8
-rw-r--r--html-test/ref/Examples.html6
-rw-r--r--html-test/ref/Extensions.html6
-rw-r--r--html-test/ref/FunArgs.html14
-rw-r--r--html-test/ref/GADTRecords.html66
-rw-r--r--html-test/ref/Hash.html116
-rw-r--r--html-test/ref/HiddenInstances.html154
-rw-r--r--html-test/ref/HiddenInstancesB.html48
-rw-r--r--html-test/ref/Hyperlinks.html6
-rw-r--r--html-test/ref/IgnoreExports.html8
-rw-r--r--html-test/ref/ImplicitParams.html14
-rw-r--r--html-test/ref/Minimal.html54
-rw-r--r--html-test/ref/ModuleWithWarning.html6
-rw-r--r--html-test/ref/NamedDoc.html4
-rw-r--r--html-test/ref/Nesting.html65
-rw-r--r--html-test/ref/NoLayout.html6
-rw-r--r--html-test/ref/NonGreedy.html6
-rw-r--r--html-test/ref/Operators.html56
-rw-r--r--html-test/ref/PatternSyns.html24
-rw-r--r--html-test/ref/PromotedTypes.html201
-rw-r--r--html-test/ref/Properties.html6
-rw-r--r--html-test/ref/PruneWithWarning.html4
-rw-r--r--html-test/ref/QuasiExpr.html128
-rw-r--r--html-test/ref/QuasiQuote.html4
-rw-r--r--html-test/ref/SpuriousSuperclassConstraints.html114
-rw-r--r--html-test/ref/TH.html4
-rw-r--r--html-test/ref/TH2.html4
-rw-r--r--html-test/ref/Test.html638
-rw-r--r--html-test/ref/Threaded.html (renamed from html-test/ref/Ticket253_1.html)45
-rw-r--r--html-test/ref/Ticket112.html4
-rw-r--r--html-test/ref/Ticket61.html8
-rw-r--r--html-test/ref/Ticket75.html10
-rw-r--r--html-test/ref/TitledPicture.html8
-rw-r--r--html-test/ref/TypeFamilies.html1030
-rw-r--r--html-test/ref/TypeFamilies2.html122
-rw-r--r--html-test/ref/TypeOperators.html46
-rw-r--r--html-test/ref/Unicode.html6
-rw-r--r--html-test/ref/Visible.html6
-rw-r--r--html-test/ref/frames.html2
-rw-r--r--html-test/ref/haddock-util.js24
-rw-r--r--html-test/ref/mini_FunArgs.html18
-rw-r--r--html-test/ref/ocean.css69
-rwxr-xr-xhtml-test/run.lhs24
-rw-r--r--html-test/src/AdvanceTypes.hs9
-rw-r--r--html-test/src/Bug253.hs10
-rw-r--r--html-test/src/Bug387.hs12
-rw-r--r--html-test/src/Bug8.hs1
-rw-r--r--html-test/src/Bugs.hs2
-rw-r--r--html-test/src/Instances.hs99
-rw-r--r--html-test/src/Nesting.hs15
-rw-r--r--html-test/src/PromotedTypes.hs25
-rw-r--r--html-test/src/Threaded.hs10
-rw-r--r--html-test/src/Threaded_TH.hs13
-rw-r--r--html-test/src/Ticket253_1.hs6
-rw-r--r--html-test/src/Ticket253_2.hs6
-rw-r--r--hypsrc-test/Utils.hs47
-rwxr-xr-xhypsrc-test/accept.hs27
-rw-r--r--hypsrc-test/ref/src/Classes.html1065
-rw-r--r--hypsrc-test/ref/src/Constructors.html940
-rw-r--r--hypsrc-test/ref/src/Identifiers.html935
-rw-r--r--hypsrc-test/ref/src/Literals.html428
-rw-r--r--hypsrc-test/ref/src/Operators.html837
-rw-r--r--hypsrc-test/ref/src/Records.html993
-rw-r--r--hypsrc-test/ref/src/Types.html1057
-rwxr-xr-xhypsrc-test/run.hs122
-rw-r--r--hypsrc-test/src/Classes.hs38
-rw-r--r--hypsrc-test/src/Constructors.hs35
-rw-r--r--hypsrc-test/src/Identifiers.hs28
-rw-r--r--hypsrc-test/src/Literals.hs17
-rw-r--r--hypsrc-test/src/Operators.hs22
-rw-r--r--hypsrc-test/src/Polymorphism.hs66
-rw-r--r--hypsrc-test/src/Records.hs34
-rw-r--r--hypsrc-test/src/Types.hs42
-rwxr-xr-xlatex-test/run.lhs2
164 files changed, 12118 insertions, 1981 deletions
diff --git a/.gitignore b/.gitignore
index 6b8d26e0..3c9798c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,9 +2,12 @@
/haddock-api/dist/
/haddock-library/dist/
/html-test/out/
+/hypsrc-test/out/
/latex-test/out/
/doc/haddock
+/doc/haddock.ps
+/doc/haddock.pdf
/doc/autom4te.cache/
/doc/config.log
/doc/config.mk
@@ -12,3 +15,6 @@
/doc/configure
tags
TAGS
+
+.cabal-sandbox
+cabal.sandbox.config
diff --git a/.travis.yml b/.travis.yml
index ad1331f8..c16b1709 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,20 +3,25 @@ language: haskell
env:
# - GHCVER=7.8.2
# - GHCVER=7.8.3
+ - GHCVER=7.10.2
before_install:
- sudo add-apt-repository -y ppa:hvr/ghc
- sudo apt-get update
- sudo apt-get install ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
+ - sudo apt-get install cabal-install-1.22
+ - export PATH=/opt/cabal/1.22/bin:$PATH
+ - cabal --version
- cd haddock-library
- cabal install --only-dependencies --enable-tests
- cabal install doctest
- - cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test
+ # --ghc-options=-Werror
+ - cabal configure --enable-tests && cabal build && cabal test
- doctest -isrc -i$(echo vendor/attoparsec-*) -optP-include -optPdist/build/autogen/cabal_macros.h src/Documentation/Haddock/Parser.hs
- cabal install
- cd ..
- - (cd haddock-api/ && cabal install --only-dependencies --enable-tests && cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test && cabal install)
+ - (cd haddock-api/ && cabal install --only-dependencies --enable-tests && cabal configure --enable-tests && cabal build && cabal test && cabal install)
script:
- - cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test
+ - cabal configure --enable-tests && cabal build && cabal test
diff --git a/CHANGES b/CHANGES
index 5688537d..2cb0a5e0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,38 @@
+Changes in version 2.16.2
+
+ * Generate hyperlinked source ourselves (#410, part of GSOC 2015)
+
+ * Fix expansion icon for user-collapsible sections (#412)
+
+ * Break up response file arguments on newlines
+
+ * Various HTML fixes (#301, #406, #407, #421)
+
+ * Line anchors in hyperlinked source (#420)
+
+Changes in version 2.16.1
+
+ * Don't default to type constructors for out-of-scope names (#253 and
+ #375)
+
+ * Fix Hoogle display of constructors (#361)
+
+ * Fully qualify names in Hoogle instances output (#263)
+
+ * Output method documentation in Hoogle backend (#259)
+
+ * Don't print instance safety information in Hoogle (#168)
+
+ * Expand response files in arguments (#285)
+
+ * Build the main executable with -threaded (#399)
+
+ * Use SrcSpan of declarations for inferred type sigs (#207)
+
+ * Fix cross-module instance locations (#383)
+
+ * Fix alignment of Source link for instances in Firefox (#384)
+
Changes in version 2.16.0
* Experimental collapsible header support (#335)
@@ -26,6 +61,12 @@ Changes in version 2.16.0
* properly render package ID (not package key) in index (#329)
+ * links to source location of class instance definitions
+
+ * Fix code blocks in presence of Windows line endings
+
+ * Deal better with long synopsis lines (#151)
+
Changes in version 2.15.0
* Always read in prologue files as UTF8 (#286 and Cabal #1721)
diff --git a/README b/README.md
index 53f84bf0..31015e91 100644
--- a/README
+++ b/README.md
@@ -1,5 +1,7 @@
-Haddock, a Haskell Documentation Tool
-=====================================
+# Haddock, a Haskell Documentation Tool
+
+
+#### About haddock
This is Haddock, a tool for automatically generating documentation
from annotated Haskell source code. It is primary intended for
@@ -26,12 +28,45 @@ generated. Abstract types and classes are handled correctly. In
fact, even without any documentation annotations, Haddock can generate
useful documentation from your source code.
+
+#### Documentation formats
+
Haddock can generate documentation in multiple formats; currently HTML
is implemented, and there is partial support for generating LaTeX and
Hoogle.
+
+#### Source code documentation
+
Full documentation can be found in the doc/ subdirectory, in DocBook
format.
-Please create issues when you have any problems and pull requests if
-you have some code. \ No newline at end of file
+
+#### Contributing
+
+Please create issues when you have any problems and pull requests if you have some code.
+
+###### Hacking
+
+To get started you'll need a latest GHC release installed. Below is an
+example setup using cabal sandboxes.
+
+```bash
+ git clone https://github.com/haskell/haddock.git
+ cd haddock
+ cabal sandbox init
+ cabal sandbox add-source haddock-library
+ cabal sandbox add-source haddock-api
+ # adjust -j to the number of cores you want to use
+ cabal install -j4 --dependencies-only --enable-tests
+ cabal configure --enable-tests
+ cabal build -j4
+ # run the test suite
+ cabal test
+```
+
+If you're a GHC developer and want to update Haddock to work with your
+changes, you should be working on `ghc-head` branch instead of master.
+See instructions at
+https://ghc.haskell.org/trac/ghc/wiki/WorkingConventions/Git/Submodules
+for an example workflow.
diff --git a/doc/README b/doc/README.md
index 5bc038bf..cf1fc31b 100644
--- a/doc/README
+++ b/doc/README.md
@@ -1,5 +1,4 @@
-Haddock documentation
----------------------
+# Haddock documentation
The documentation is in DocBook XML format. You need some tools to
process it: at least xsltproc, and the DocBook XML DTD and XSL
@@ -8,19 +7,19 @@ process the documentation on your system, and a Makefile to actually
do the processing (so, on Windows, you'll need Cygwin or MSys in
addition to the DocBook XML tools). To build the HTML documentation:
- $ autoconf
- $ ./configure
- $ make html
+ $ autoconf
+ $ ./configure
+ $ make html
which leaves the HTML documentation in a haddock/ subdirectory.
Printable documentation can also be produced, eg.:
- $ make pdf
+ $ make pdf
or
- $ make ps
+ $ make ps
Generating the printed formats requires more tools (fop or xmltex) and
tends to be a bit harder.
diff --git a/doc/haddock.xml b/doc/haddock.xml
index 2ffd7d78..e805a437 100644
--- a/doc/haddock.xml
+++ b/doc/haddock.xml
@@ -12,7 +12,7 @@
<book id="haddock">
<bookinfo>
- <date>2004-08-02</date>
+ <date>2015-06-02</date>
<title>Haddock User Guide</title>
<author>
<firstname>Simon</firstname>
@@ -24,12 +24,21 @@
<surname>Waern</surname>
</author>
<address><email>david.waern@gmail.com</email></address>
+ <author>
+ <firstname>Mateusz</firstname>
+ <surname>Kowalczyk</surname>
+ </author>
+ <address><email>fuuzetsu@fuuzetsu.co.uk</email></address>
<copyright>
<year>2010</year>
<holder>Simon Marlow, David Waern</holder>
</copyright>
+ <copyright>
+ <year>2013-2015</year>
+ <holder>Mateusz Kowalczyk</holder>
+ </copyright>
<abstract>
- <para>This document describes Haddock version 2.15.1, a Haskell
+ <para>This document describes Haddock version 2.16.2, a Haskell
documentation tool.</para>
</abstract>
</bookinfo>
@@ -336,11 +345,27 @@
<varlistentry>
<term>
<indexterm><primary><option>-i</option></primary></indexterm>
- <option>-i</option> <replaceable>path</replaceable>,<replaceable>file</replaceable>
+ <option>-i</option> <replaceable>file</replaceable>
+ </term>
+ <term>
+ <indexterm><primary><option>-i</option></primary></indexterm>
+ <option>-i</option> <replaceable>docpath</replaceable>,<replaceable>file</replaceable>
+ </term>
+ <term>
+ <indexterm><primary><option>-i</option></primary></indexterm>
+ <option>-i</option> <replaceable>docpath</replaceable>,<replaceable>srcpath</replaceable>,<replaceable>file</replaceable>
</term>
<term>
<indexterm><primary><option>--read-interface</option></primary></indexterm>
- <option>--read-interface</option>=<replaceable>path</replaceable>,<replaceable>file</replaceable>
+ <option>--read-interface</option>=<replaceable>file</replaceable>
+ </term>
+ <term>
+ <indexterm><primary><option>--read-interface</option></primary></indexterm>
+ <option>--read-interface</option>=<replaceable>docpath</replaceable>,<replaceable>file</replaceable>
+ </term>
+ <term>
+ <indexterm><primary><option>--read-interface</option></primary></indexterm>
+ <option>--read-interface</option>=<replaceable>docpath</replaceable>,<replaceable>srcpath</replaceable>,<replaceable>file</replaceable>
</term>
<listitem>
<para>Read the interface file in
@@ -348,19 +373,25 @@
produced by running Haddock with the
<option>--dump-interface</option> option. The interface
describes a set of modules whose HTML documentation is
- located in <replaceable>path</replaceable> (which may be a
- relative pathname). The <replaceable>path</replaceable> is
- optional, and defaults to <quote>.</quote>.</para>
+ located in <replaceable>docpath</replaceable> (which may be a
+ relative pathname). The <replaceable>docpath</replaceable> is
+ optional, and defaults to <quote>.</quote>. The
+ <replaceable>srcpath</replaceable> is optional but has no default
+ value.</para>
<para>This option allows Haddock to produce separate sets of
documentation with hyperlinks between them. The
- <replaceable>path</replaceable> is used to direct hyperlinks
+ <replaceable>docpath</replaceable> is used to direct hyperlinks
to point to the right files; so make sure you don't move the
HTML files later or these links will break. Using a
- relative <replaceable>path</replaceable> means that a
+ relative <replaceable>docpath</replaceable> means that a
documentation subtree can still be moved around without
breaking links.</para>
+ <para>Similarly to <replaceable>docpath</replaceable>, <replaceable>srcpath</replaceable> is used generate cross-package hyperlinks but
+ within sources rendered with <option>--hyperlinked-source</option>
+ option.</para>
+
<para>Multiple <option>--read-interface</option> options may
be given.</para>
</listitem>
@@ -521,6 +552,43 @@ $ pdflatex <replaceable>package</replaceable>.tex</screen>
<varlistentry>
<term>
+ <indexterm><primary><option>--hyperlinked-source</option></primary></indexterm>
+ <option>--hyperlinked-source</option>
+ </term>
+ <listitem>
+ <para>Generate hyperlinked source code (as HTML web page). All
+ rendered files will be put into
+ <filename class='directory'>src/</filename> subfolder of output
+ directory.</para>
+ <para>Usually, this should be used in combination with
+ <option>--html</option> option - generated documentation will then
+ contain references to appropriate code fragments. Previously, this
+ behaviour could be achieved by generating sources using external
+ tool and specifying <option>--source-base</option>,
+ <option>--source-module</option>, <option>--source-entity</option>
+ and related options. Note that these flags are ignored once
+ <option>--hyperlinked-source</option> is set.</para>
+ <para>In order to make cross-package source hyperlinking possible,
+ appropriate source paths have to be set up when providing
+ interface files using <option>--read-interface</option>
+ option.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <indexterm><primary><option>--source-css</option></primary></indexterm>
+ <option>--source-css=<replaceable>style</replaceable></option>
+ </term>
+ <listitem>
+ <para>Use custom CSS file for sources rendered by the
+ <option>--hyperlinked-source</option> option. If no custom style
+ file is provided, Haddock will use default one.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
<indexterm><primary><option>-S</option></primary></indexterm>
<option>-S</option>
</term>
@@ -2029,7 +2097,18 @@ This belongs to the list above!
2. No newline separation even in indented lists.
-}
</programlisting>
+ <para>The indentation of the first list item is honoured. That is,
+ in the following example the items are on the same level. Before
+ Haddock 2.16.1, the second item would have been nested under the
+ first item which was unexpected.
+ </para>
+<programlisting>
+{-|
+ * foo
+ * bar
+-}
+</programlisting>
</section>
<section>
diff --git a/driver/Main.hs b/driver/Main.hs
index 42b99860..ccbb8b7d 100644
--- a/driver/Main.hs
+++ b/driver/Main.hs
@@ -1,7 +1,29 @@
+{-# LANGUAGE ScopedTypeVariables #-}
module Main where
-import Documentation.Haddock (haddock)
-import System.Environment (getArgs)
+import Control.Exception
+import Documentation.Haddock (haddock)
+import System.Environment (getArgs)
+import System.Exit (exitFailure)
+import System.IO
main :: IO ()
-main = getArgs >>= haddock
+main = getArgs >>= expandResponse >>= haddock
+
+
+-- | Arguments which look like '@foo' will be replaced with the
+-- contents of file @foo@. The contents will be passed through 'words'
+-- and blanks filtered out first.
+--
+-- We quit if the file is not found or reading somehow fails.
+expandResponse :: [String] -> IO [String]
+expandResponse = fmap concat . mapM expand
+ where
+ expand :: String -> IO [String]
+ expand ('@':f) = readFileExc f >>= return . filter (not . null) . lines
+ expand x = return [x]
+
+ readFileExc f =
+ readFile f `catch` \(e :: IOException) -> do
+ hPutStrLn stderr $ "Error while expanding response file: " ++ show e
+ exitFailure
diff --git a/haddock-api/haddock-api.cabal b/haddock-api/haddock-api.cabal
index 292965bf..7835ea50 100644
--- a/haddock-api/haddock-api.cabal
+++ b/haddock-api/haddock-api.cabal
@@ -1,5 +1,5 @@
name: haddock-api
-version: 2.16.0
+version: 2.16.2
synopsis: A documentation-generation tool for Haskell libraries
description: Haddock is a documentation-generation tool for Haskell
libraries
@@ -18,8 +18,10 @@ stability: experimental
data-dir:
resources
data-files:
+ html/solarized.css
html/frames.html
html/haddock-util.js
+ html/highlight.js
html/Classic.theme/haskell_icon.gif
html/Classic.theme/minus.gif
html/Classic.theme/plus.gif
@@ -41,15 +43,16 @@ library
, filepath
, directory
, containers
+ , transformers
, deepseq
, array
, xhtml >= 3000.2 && < 3000.3
, Cabal >= 1.10
, ghc-boot
- , ghc == 7.9.*
+ , ghc >= 7.10 && < 7.12
, ghc-paths
- , haddock-library == 1.2.0.*
+ , haddock-library == 1.2.*
hs-source-dirs:
src
@@ -67,6 +70,7 @@ library
Haddock.Interface.AttachInstances
Haddock.Interface.LexParseRn
Haddock.Interface.ParseModuleHeader
+ Haddock.Interface.Specialize
Haddock.Parser
Haddock.Utils
Haddock.Backends.Xhtml
@@ -80,6 +84,12 @@ library
Haddock.Backends.LaTeX
Haddock.Backends.HaddockDB
Haddock.Backends.Hoogle
+ Haddock.Backends.Hyperlinker
+ Haddock.Backends.Hyperlinker.Ast
+ Haddock.Backends.Hyperlinker.Parser
+ Haddock.Backends.Hyperlinker.Renderer
+ Haddock.Backends.Hyperlinker.Types
+ Haddock.Backends.Hyperlinker.Utils
Haddock.ModuleTree
Haddock.Types
Haddock.Doc
@@ -87,9 +97,30 @@ library
Haddock.InterfaceFile
Haddock.Options
Haddock.GhcUtils
+ Haddock.Syb
Haddock.Convert
Paths_haddock_api
+test-suite spec
+ type: exitcode-stdio-1.0
+ default-language: Haskell2010
+ main-is: Spec.hs
+ ghc-options: -Wall
+
+ hs-source-dirs:
+ test
+ , src
+
+ other-modules:
+ Haddock.Backends.Hyperlinker.ParserSpec
+
+ build-depends:
+ base >= 4.3 && < 4.9
+ , containers
+ , ghc >= 7.10 && < 7.12
+ , hspec
+ , QuickCheck == 2.*
+
source-repository head
type: git
location: https://github.com/haskell/haddock.git
diff --git a/haddock-api/resources/html/Ocean.std-theme/ocean.css b/haddock-api/resources/html/Ocean.std-theme/ocean.css
index de436324..139335ac 100644
--- a/haddock-api/resources/html/Ocean.std-theme/ocean.css
+++ b/haddock-api/resources/html/Ocean.std-theme/ocean.css
@@ -41,6 +41,9 @@ a[href]:link { color: rgb(196,69,29); }
a[href]:visited { color: rgb(171,105,84); }
a[href]:hover { text-decoration:underline; }
+a[href].def:link, a[href].def:visited { color: black; }
+a[href].def:hover { color: rgb(78, 98, 114); }
+
/* @end */
/* @group Fonts & Sizes */
@@ -143,15 +146,23 @@ ul.links li a {
background-image: url(plus.gif);
background-repeat: no-repeat;
}
-p.caption.collapser,
-p.caption.expander {
- background-position: 0 0.4em;
-}
.collapser, .expander {
padding-left: 14px;
margin-left: -14px;
cursor: pointer;
}
+p.caption.collapser,
+p.caption.expander {
+ background-position: 0 0.4em;
+}
+
+.instance.collapser, .instance.expander {
+ margin-left: 0px;
+ background-position: left center;
+ min-width: 9px;
+ min-height: 9px;
+}
+
pre {
padding: 0.25em;
@@ -318,6 +329,7 @@ div#style-menu-holder {
height: 80%;
top: 10%;
padding: 0;
+ max-width: 75%;
}
#synopsis .caption {
@@ -378,6 +390,15 @@ div#style-menu-holder {
margin: 0 -0.5em 0 0.5em;
}
+#interface td.src .link {
+ float: right;
+ color: #919191;
+ border-left: 1px solid #919191;
+ background: #f0f0f0;
+ padding: 0 0.5em 0.2em;
+ margin: 0 -0.5em 0 0.5em;
+}
+
#interface span.fixity {
color: #919191;
border-left: 1px solid #919191;
@@ -406,30 +427,39 @@ div#style-menu-holder {
margin-top: 0.8em;
}
-.subs dl {
+.clearfix:after {
+ clear: both;
+ content: " ";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+
+.subs ul {
+ list-style: none;
+ display: table;
margin: 0;
}
-.subs dt {
- float: left;
- clear: left;
- display: block;
+.subs ul li {
+ display: table-row;
+}
+
+.subs ul li dfn {
+ display: table-cell;
+ font-style: normal;
+ font-weight: bold;
margin: 1px 0;
+ white-space: nowrap;
}
-.subs dd {
- float: right;
- width: 90%;
- display: block;
+.subs ul li > .doc {
+ display: table-cell;
padding-left: 0.5em;
margin-bottom: 0.5em;
}
-.subs dd.empty {
- display: none;
-}
-
-.subs dd p {
+.subs ul li > .doc p {
margin: 0;
}
@@ -445,6 +475,11 @@ div#style-menu-holder {
margin-left: 1em;
}
+/* Workaround for bug in Firefox (issue #384) */
+.inst-left {
+ float: left;
+}
+
.top p.src {
border-top: 1px solid #ccc;
}
diff --git a/haddock-api/resources/html/frames.html b/haddock-api/resources/html/frames.html
index 1b4e38d4..e86edb66 100644
--- a/haddock-api/resources/html/frames.html
+++ b/haddock-api/resources/html/frames.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html
+<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
diff --git a/haddock-api/resources/html/haddock-util.js b/haddock-api/resources/html/haddock-util.js
index 9a6fccf7..fc7743fe 100644
--- a/haddock-api/resources/html/haddock-util.js
+++ b/haddock-api/resources/html/haddock-util.js
@@ -131,11 +131,11 @@ function perform_search(full)
var text = document.getElementById("searchbox").value.toLowerCase();
if (text == last_search && !full) return;
last_search = text;
-
+
var table = document.getElementById("indexlist");
var status = document.getElementById("searchmsg");
var children = table.firstChild.childNodes;
-
+
// first figure out the first node with the prefix
var first = bisect(-1);
var last = (first == -1 ? -1 : bisect(1));
@@ -166,7 +166,7 @@ function perform_search(full)
status.innerHTML = "";
}
-
+
function setclass(first, last, status)
{
for (var i = first; i <= last; i++)
@@ -174,8 +174,8 @@ function perform_search(full)
children[i].className = status;
}
}
-
-
+
+
// do a binary search, treating 0 as ...
// return either -1 (no 0's found) or location of most far match
function bisect(dir)
@@ -201,9 +201,9 @@ function perform_search(full)
if (checkitem(i) == 0) return i;
}
return -1;
- }
-
-
+ }
+
+
// from an index, decide what the result is
// 0 = match, -1 is lower, 1 is higher
function checkitem(i)
@@ -212,8 +212,8 @@ function perform_search(full)
if (s == text) return 0;
else return (s > text ? -1 : 1);
}
-
-
+
+
// from an index, get its string
// this abstracts over alternates
function getitem(i)
@@ -229,7 +229,7 @@ function perform_search(full)
}
function setSynopsis(filename) {
- if (parent.window.synopsis) {
+ if (parent.window.synopsis && parent.window.synopsis.location) {
if (parent.window.synopsis.location.replace) {
// In Firefox this avoids adding the change to the history.
parent.window.synopsis.location.replace(filename);
@@ -250,7 +250,7 @@ function addMenuItem(html) {
function adjustForFrames() {
var bodyCls;
-
+
if (parent.location.href == window.location.href) {
// not in frames, so add Frames button
addMenuItem("<a href='#' onclick='reframe();return true;'>Frames</a>");
diff --git a/haddock-api/resources/html/highlight.js b/haddock-api/resources/html/highlight.js
new file mode 100644
index 00000000..1e903bd0
--- /dev/null
+++ b/haddock-api/resources/html/highlight.js
@@ -0,0 +1,27 @@
+
+var highlight = function (on) {
+ return function () {
+ var links = document.getElementsByTagName('a');
+ for (var i = 0; i < links.length; i++) {
+ var that = links[i];
+
+ if (this.href != that.href) {
+ continue;
+ }
+
+ if (on) {
+ that.classList.add("hover-highlight");
+ } else {
+ that.classList.remove("hover-highlight");
+ }
+ }
+ }
+};
+
+window.onload = function () {
+ var links = document.getElementsByTagName('a');
+ for (var i = 0; i < links.length; i++) {
+ links[i].onmouseover = highlight(true);
+ links[i].onmouseout = highlight(false);
+ }
+};
diff --git a/haddock-api/resources/html/solarized.css b/haddock-api/resources/html/solarized.css
new file mode 100644
index 00000000..e83dc5ec
--- /dev/null
+++ b/haddock-api/resources/html/solarized.css
@@ -0,0 +1,55 @@
+body {
+ background-color: #fdf6e3;
+}
+
+.hs-identifier {
+ color: #073642;
+}
+
+.hs-identifier.hs-var {
+}
+
+.hs-identifier.hs-type {
+ color: #5f5faf;
+}
+
+.hs-keyword {
+ color: #af005f;
+}
+
+.hs-string, .hs-char {
+ color: #cb4b16;
+}
+
+.hs-number {
+ color: #268bd2;
+}
+
+.hs-operator {
+ color: #d33682;
+}
+
+.hs-glyph, .hs-special {
+ color: #dc322f;
+}
+
+.hs-comment {
+ color: #8a8a8a;
+}
+
+.hs-pragma {
+ color: #2aa198;
+}
+
+.hs-cpp {
+ color: #859900;
+}
+
+a:link, a:visited {
+ text-decoration: none;
+ border-bottom: 1px solid #eee8d5;
+}
+
+a:hover, a.hover-highlight {
+ background-color: #eee8d5;
+}
diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs
index 72ec21c8..70cdf8a3 100644
--- a/haddock-api/src/Haddock.hs
+++ b/haddock-api/src/Haddock.hs
@@ -30,6 +30,7 @@ import Haddock.Backends.Xhtml
import Haddock.Backends.Xhtml.Themes (getThemes)
import Haddock.Backends.LaTeX
import Haddock.Backends.Hoogle
+import Haddock.Backends.Hyperlinker
import Haddock.Interface
import Haddock.Parser
import Haddock.Types
@@ -39,11 +40,13 @@ import Haddock.Options
import Haddock.Utils
import Control.Monad hiding (forM_)
+import Control.Applicative
import Data.Foldable (forM_)
import Data.List (isPrefixOf)
import Control.Exception
import Data.Maybe
import Data.IORef
+import Data.Map (Map)
import qualified Data.Map as Map
import System.IO
import System.Exit
@@ -154,6 +157,7 @@ haddockWithGhc ghc args = handleTopExceptions $ do
_ -> return flags
unless (Flag_NoWarnings `elem` flags) $ do
+ hypSrcWarnings flags
forM_ (warnings args) $ \warning -> do
hPutStrLn stderr warning
@@ -222,13 +226,16 @@ renderStep dflags flags qual pkgs interfaces = do
let
ifaceFiles = map snd pkgs
installedIfaces = concatMap ifInstalledIfaces ifaceFiles
- srcMap = Map.fromList [ (ifUnitId if_, x) | ((_, Just x), if_) <- pkgs ]
- render dflags flags qual interfaces installedIfaces srcMap
+ extSrcMap = Map.fromList $ do
+ ((_, Just path), ifile) <- pkgs
+ iface <- ifInstalledIfaces ifile
+ return (instMod iface, path)
+ render dflags flags qual interfaces installedIfaces extSrcMap
-- | Render the interfaces with whatever backend is specified in the flags.
-render :: DynFlags -> [Flag] -> QualOption -> [Interface] -> [InstalledInterface] -> SrcMap -> IO ()
-render dflags flags qual ifaces installedIfaces srcMap = do
+render :: DynFlags -> [Flag] -> QualOption -> [Interface] -> [InstalledInterface] -> Map Module FilePath -> IO ()
+render dflags flags qual ifaces installedIfaces extSrcMap = do
let
title = fromMaybe "" (optTitle flags)
@@ -239,6 +246,7 @@ render dflags flags qual ifaces installedIfaces srcMap = do
opt_index_url = optIndexUrl flags
odir = outputDir flags
opt_latex_style = optLaTeXStyle flags
+ opt_source_css = optSourceCssFile flags
visibleIfaces = [ i | i <- ifaces, OptHide `notElem` ifaceOptions i ]
@@ -247,15 +255,35 @@ render dflags flags qual ifaces installedIfaces srcMap = do
allVisibleIfaces = [ i | i <- allIfaces, OptHide `notElem` instOptions i ]
pkgMod = ifaceMod (head ifaces)
- pkgKey = moduleUnitId pkgMod
+ pkgKey = moduleUnitId pkgMod
pkgStr = Just (unitIdString pkgKey)
- (pkgName,pkgVer) = modulePackageInfo dflags flags pkgMod
+ pkgNameVer = modulePackageInfo dflags flags pkgMod
(srcBase, srcModule, srcEntity, srcLEntity) = sourceUrls flags
- srcMap' = maybe srcMap (\path -> Map.insert pkgKey path srcMap) srcEntity
+
+ srcModule'
+ | Flag_HyperlinkedSource `elem` flags = Just hypSrcModuleUrlFormat
+ | otherwise = srcModule
+
+ srcMap = mkSrcMap $ Map.union
+ (Map.map SrcExternal extSrcMap)
+ (Map.fromList [ (ifaceMod iface, SrcLocal) | iface <- ifaces ])
+
+ pkgSrcMap = Map.mapKeys moduleUnitId extSrcMap
+ pkgSrcMap'
+ | Flag_HyperlinkedSource `elem` flags =
+ Map.insert pkgKey hypSrcModuleNameUrlFormat pkgSrcMap
+ | Just srcNameUrl <- srcEntity = Map.insert pkgKey srcNameUrl pkgSrcMap
+ | otherwise = pkgSrcMap
+
-- TODO: Get these from the interface files as with srcMap
- srcLMap' = maybe Map.empty (\path -> Map.singleton pkgKey path) srcLEntity
- sourceUrls' = (srcBase, srcModule, srcMap', srcLMap')
+ pkgSrcLMap'
+ | Flag_HyperlinkedSource `elem` flags =
+ Map.singleton pkgKey hypSrcModuleLineUrlFormat
+ | Just path <- srcLEntity = Map.singleton pkgKey path
+ | otherwise = Map.empty
+
+ sourceUrls' = (srcBase, srcModule', pkgSrcMap', pkgSrcLMap')
libDir <- getHaddockLibDir flags
prologue <- getPrologue dflags flags
@@ -285,17 +313,28 @@ render dflags flags qual ifaces installedIfaces srcMap = do
-- TODO: we throw away Meta for both Hoogle and LaTeX right now,
-- might want to fix that if/when these two get some work on them
when (Flag_Hoogle `elem` flags) $ do
- let pkgNameStr | unpackFS pkgNameFS == "main" && title /= []
- = title
- | otherwise = unpackFS pkgNameFS
- where PackageName pkgNameFS = pkgName
- ppHoogle dflags pkgNameStr pkgVer title (fmap _doc prologue) visibleIfaces
- odir
+ case pkgNameVer of
+ Nothing -> putStrLn . unlines $
+ [ "haddock: Unable to find a package providing module "
+ ++ moduleNameString (moduleName pkgMod) ++ ", skipping Hoogle."
+ , ""
+ , " Perhaps try specifying the desired package explicitly"
+ ++ " using the --package-name"
+ , " and --package-version arguments."
+ ]
+ Just (PackageName pkgNameFS, pkgVer) ->
+ let pkgNameStr | unpackFS pkgNameFS == "main" && title /= [] = title
+ | otherwise = unpackFS pkgNameFS
+ in ppHoogle dflags pkgNameStr pkgVer title (fmap _doc prologue)
+ visibleIfaces odir
when (Flag_LaTeX `elem` flags) $ do
ppLaTeX title pkgStr visibleIfaces odir (fmap _doc prologue) opt_latex_style
libDir
+ when (Flag_HyperlinkedSource `elem` flags) $ do
+ ppHyperlinkedSource odir libDir opt_source_css pretty srcMap ifaces
+
-- | From GHC 7.10, this function has a potential to crash with a
-- nasty message such as @expectJust getPackageDetails@ because
-- package name and versions can no longer reliably be extracted in
@@ -309,12 +348,12 @@ modulePackageInfo :: DynFlags
-- contain the package name or version
-- provided by the user which we
-- prioritise
- -> Module -> (PackageName, Data.Version.Version)
+ -> Module -> Maybe (PackageName, Data.Version.Version)
modulePackageInfo dflags flags modu =
- (fromMaybe (packageName pkg) (optPackageName flags),
- fromMaybe (packageVersion pkg) (optPackageVersion flags))
+ cmdline <|> pkgDb
where
- pkg = getPackageDetails dflags (moduleUnitId modu)
+ cmdline = (,) <$> optPackageName flags <*> optPackageVersion flags
+ pkgDb = (\pkg -> (packageName pkg, packageVersion pkg)) <$> lookupPackage dflags (moduleUnitId modu)
-------------------------------------------------------------------------------
@@ -464,6 +503,35 @@ shortcutFlags flags = do
++ "Ported to use the GHC API by David Waern 2006-2008\n"
+-- | Generate some warnings about potential misuse of @--hyperlinked-source@.
+hypSrcWarnings :: [Flag] -> IO ()
+hypSrcWarnings flags = do
+
+ when (hypSrc && any isSourceUrlFlag flags) $
+ hPutStrLn stderr $ concat
+ [ "Warning: "
+ , "--source-* options are ignored when "
+ , "--hyperlinked-source is enabled."
+ ]
+
+ when (not hypSrc && any isSourceCssFlag flags) $
+ hPutStrLn stderr $ concat
+ [ "Warning: "
+ , "source CSS file is specified but "
+ , "--hyperlinked-source is disabled."
+ ]
+
+ where
+ hypSrc = Flag_HyperlinkedSource `elem` flags
+ isSourceUrlFlag (Flag_SourceBaseURL _) = True
+ isSourceUrlFlag (Flag_SourceModuleURL _) = True
+ isSourceUrlFlag (Flag_SourceEntityURL _) = True
+ isSourceUrlFlag (Flag_SourceLEntityURL _) = True
+ isSourceUrlFlag _ = False
+ isSourceCssFlag (Flag_SourceCss _) = True
+ isSourceCssFlag _ = False
+
+
updateHTMLXRefs :: [(DocPaths, InterfaceFile)] -> IO ()
updateHTMLXRefs packages = do
writeIORef html_xrefs_ref (Map.fromList mapping)
diff --git a/haddock-api/src/Haddock/Backends/HaddockDB.hs b/haddock-api/src/Haddock/Backends/HaddockDB.hs
index 1c248bfb..0bdc9057 100644
--- a/haddock-api/src/Haddock/Backends/HaddockDB.hs
+++ b/haddock-api/src/Haddock/Backends/HaddockDB.hs
@@ -40,7 +40,7 @@ ppIfaces mods
where
do_mod (Module mod, iface)
= text "<sect1 id=\"sec-" <> text mod <> text "\">"
- $$ text "<title><literal>"
+ $$ text "<title><literal>"
<> text mod
<> text "</literal></title>"
$$ text "<indexterm><primary><literal>"
@@ -50,10 +50,10 @@ ppIfaces mods
$$ vcat (map (do_export mod) (eltsFM (iface_decls iface)))
$$ text "</variablelist>"
$$ text "</sect1>"
-
+
do_export mod decl | (nm:_) <- declBinders decl
= text "<varlistentry id=" <> ppLinkId mod nm <> char '>'
- $$ text "<term><literal>"
+ $$ text "<term><literal>"
<> do_decl decl
<> text "</literal></term>"
$$ text "<listitem>"
@@ -63,11 +63,11 @@ ppIfaces mods
$$ text "</varlistentry>"
do_export _ _ = empty
- do_decl (HsTypeSig _ [nm] ty _)
+ do_decl (HsTypeSig _ [nm] ty _)
= ppHsName nm <> text " :: " <> ppHsType ty
do_decl (HsTypeDecl _ nm args ty _)
= hsep ([text "type", ppHsName nm ]
- ++ map ppHsName args
+ ++ map ppHsName args
++ [equals, ppHsType ty])
do_decl (HsNewTypeDecl loc ctx nm args con drv _)
= hsep ([text "data", ppHsName nm] -- data, not newtype
@@ -87,7 +87,7 @@ ppHsConstr :: HsConDecl -> Doc
ppHsConstr (HsRecDecl pos name tvs ctxt fieldList maybe_doc) =
ppHsName name
<> (braces . hsep . punctuate comma . map ppField $ fieldList)
-ppHsConstr (HsConDecl pos name tvs ctxt typeList maybe_doc) =
+ppHsConstr (HsConDecl pos name tvs ctxt typeList maybe_doc) =
hsep (ppHsName name : map ppHsBangType typeList)
ppField (HsFieldDecl ns ty doc)
@@ -100,7 +100,7 @@ ppHsBangType (HsUnBangedTy ty) = ppHsType ty
ppHsContext :: HsContext -> Doc
ppHsContext [] = empty
-ppHsContext context = parenList (map (\ (a,b) -> ppHsQName a <+>
+ppHsContext context = parenList (map (\ (a,b) -> ppHsQName a <+>
hsep (map ppHsAType b)) context)
ppHsType :: HsType -> Doc
@@ -109,7 +109,7 @@ ppHsType (HsForAllType Nothing context htype) =
ppHsType (HsForAllType (Just tvs) [] htype) =
hsep (text "forall" : map ppHsName tvs ++ text "." : [ppHsType htype])
ppHsType (HsForAllType (Just tvs) context htype) =
- hsep (text "forall" : map ppHsName tvs ++ text "." :
+ hsep (text "forall" : map ppHsName tvs ++ text "." :
ppHsContext context : text "=>" : [ppHsType htype])
ppHsType (HsTyFun a b) = fsep [ppHsBType a, text "-&gt;", ppHsType b]
ppHsType (HsTyIP n t) = fsep [(char '?' <> ppHsName n), text "::", ppHsType t]
@@ -135,7 +135,7 @@ ppHsQName (UnQual str) = ppHsName str
ppHsQName n@(Qual (Module mod) str)
| n == unit_con_name = ppHsName str
| isSpecial str = ppHsName str
- | otherwise
+ | otherwise
= text "<link linkend=" <> ppLinkId mod str <> char '>'
<> ppHsName str
<> text "</link>"
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index e73192ed..a9bc9a8b 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/src/Haddock/Backends/Hoogle.hs
@@ -15,12 +15,15 @@ module Haddock.Backends.Hoogle (
ppHoogle
) where
-
+import BasicTypes (OverlapFlag(..), OverlapMode(..))
+import InstEnv (ClsInst(..))
import Haddock.GhcUtils
import Haddock.Types hiding (Version)
import Haddock.Utils hiding (out)
+
import GHC
import Outputable
+import NameSet
import Data.Char
import Data.List
@@ -88,18 +91,22 @@ dropComment (x:xs) = x : dropComment xs
dropComment [] = []
-out :: Outputable a => DynFlags -> a -> String
-out dflags = f . unwords . map (dropWhile isSpace) . lines . showSDocUnqual dflags . ppr
+outWith :: Outputable a => (SDoc -> String) -> a -> [Char]
+outWith p = f . unwords . map (dropWhile isSpace) . lines . p . ppr
where
f xs | " <document comment>" `isPrefixOf` xs = f $ drop 19 xs
f (x:xs) = x : f xs
f [] = []
+out :: Outputable a => DynFlags -> a -> String
+out dflags = outWith $ showSDocUnqual dflags
operator :: String -> String
operator (x:xs) | not (isAlphaNum x) && x `notElem` "_' ([{" = '(' : x:xs ++ ")"
operator x = x
+commaSeparate :: Outputable a => DynFlags -> [a] -> String
+commaSeparate dflags = showSDocUnqual dflags . interpp'SP
---------------------------------------------------------------------
-- How to print each export
@@ -108,38 +115,84 @@ ppExport :: DynFlags -> ExportItem Name -> [String]
ppExport dflags ExportDecl { expItemDecl = L _ decl
, expItemMbDoc = (dc, _)
, expItemSubDocs = subdocs
+ , expItemFixities = fixities
} = ppDocumentation dflags dc ++ f decl
where
f (TyClD d@DataDecl{}) = ppData dflags d subdocs
f (TyClD d@SynDecl{}) = ppSynonym dflags d
- f (TyClD d@ClassDecl{}) = ppClass dflags d
- f (ForD (ForeignImport name typ _ _)) = pp_sig dflags [name] (hsSigType typ)
- f (ForD (ForeignExport name typ _ _)) = pp_sig dflags [name] (hsSigType typ)
- f (SigD sig) = ppSig dflags sig
+ f (TyClD d@ClassDecl{}) = ppClass dflags d subdocs
+ f (ForD (ForeignImport name typ _ _)) = [pp_sig dflags [name] (hsSigType typ)]
+ f (ForD (ForeignExport name typ _ _)) = [pp_sig dflags [name] (hsSigType typ)]
+ f (SigD sig) = ppSig dflags sig ++ ppFixities
f _ = []
+
+ ppFixities = concatMap (ppFixity dflags) fixities
ppExport _ _ = []
+ppSigWithDoc :: DynFlags -> Sig Name -> [(Name, DocForDecl Name)] -> [String]
+ppSigWithDoc dflags (TypeSig names sig) subdocs
+ = concatMap mkDocSig names
+ where
+ mkDocSig n = concatMap (ppDocumentation dflags) (getDoc n)
+ ++ [pp_sig dflags names (hsSigWcType sig)]
+
+ getDoc :: Located Name -> [Documentation Name]
+ getDoc n = maybe [] (return . fst) (lookup (unL n) subdocs)
+
+ppSigWithDoc _ _ _ = []
ppSig :: DynFlags -> Sig Name -> [String]
-ppSig dflags (TypeSig names sig) = pp_sig dflags names (hsSigWcType sig)
-ppSig _ _ = []
+ppSig dflags x = ppSigWithDoc dflags x []
-pp_sig :: DynFlags -> [Located Name] -> LHsType Name -> [String]
-pp_sig dflags names (L _ typ)
- = [operator prettyNames ++ " :: " ++ outHsType dflags typ]
- where
- prettyNames = intercalate ", " $ map (out dflags) names
+pp_sig :: DynFlags -> [Located Name] -> LHsType Name -> String
+pp_sig dflags names (L _ typ) =
+ operator prettyNames ++ " :: " ++ outHsType dflags typ
+ where
+ prettyNames = intercalate ", " $ map (out dflags) names
-- note: does not yet output documentation for class methods
-ppClass :: DynFlags -> TyClDecl Name -> [String]
-ppClass dflags x = out dflags x{tcdSigs=[]} :
- concatMap (ppSig dflags . unL . add_ctxt) (tcdSigs x)
- where
- add_ctxt = addClassContext (tcdName x) (tyClDeclTyVars x)
+ppClass :: DynFlags -> TyClDecl Name -> [(Name, DocForDecl Name)] -> [String]
+ppClass dflags decl subdocs = (out dflags decl{tcdSigs=[]} ++ ppTyFams) : ppMethods
+ where
-ppInstance :: DynFlags -> ClsInst -> [String]
-ppInstance dflags x = [dropComment $ out dflags x]
+ ppMethods = concat . map (ppSig' . unLoc . add_ctxt) $ tcdSigs decl
+ ppSig' = flip (ppSigWithDoc dflags) subdocs
+ add_ctxt = addClassContext (tcdName decl) (tyClDeclTyVars decl)
+
+ ppTyFams
+ | null $ tcdATs decl = ""
+ | otherwise = (" " ++) . showSDocUnqual dflags . whereWrapper $ concat
+ [ map ppr (tcdATs decl)
+ , map (ppr . tyFamEqnToSyn . unLoc) (tcdATDefs decl)
+ ]
+
+ whereWrapper elems = vcat'
+ [ text "where" <+> lbrace
+ , nest 4 . vcat . map (<> semi) $ elems
+ , rbrace
+ ]
+
+ tyFamEqnToSyn :: TyFamDefltEqn Name -> TyClDecl Name
+ tyFamEqnToSyn tfe = SynDecl
+ { tcdLName = tfe_tycon tfe
+ , tcdTyVars = tfe_pats tfe
+ , tcdRhs = tfe_rhs tfe
+ , tcdFVs = emptyNameSet
+ }
+
+
+ppInstance :: DynFlags -> ClsInst -> [String]
+ppInstance dflags x =
+ [dropComment $ outWith (showSDocForUser dflags alwaysQualify) cls]
+ where
+ -- As per #168, we don't want safety information about the class
+ -- in Hoogle output. The easiest way to achieve this is to set the
+ -- safety information to a state where the Outputable instance
+ -- produces no output which means no overlap and unsafe (or [safe]
+ -- is generated).
+ cls = x { is_flag = OverlapFlag { overlapMode = NoOverlap mempty
+ , isSafeOverlap = False } }
ppSynonym :: DynFlags -> TyClDecl Name -> [String]
ppSynonym dflags x = [out dflags x]
@@ -181,7 +234,10 @@ ppCtor dflags dat subdocs con@ConDeclH98 {}
apps = foldl1 (\x y -> reL $ HsAppTy x y)
typeSig nm flds = operator nm ++ " :: " ++ outHsType dflags (unL $ funs flds)
- name = out dflags $ map unL $ getConNames con
+
+ -- We print the constructors as comma-separated list. See GHC
+ -- docs for con_names on why it is a list to begin with.
+ name = commaSeparate dflags . map unL $ getConNames con
resType = apps $ map (reL . HsTyVar . reL) $
(tcdName dat) : [hsTyVarName v | L _ v@(UserTyVar _) <- hsQTvExplicit $ tyClDeclTyVars dat]
@@ -195,6 +251,10 @@ ppCtor dflags _dat subdocs con@ConDeclGADT {}
name = out dflags $ map unL $ getConNames con
+ppFixity :: DynFlags -> (Name, Fixity) -> [String]
+ppFixity dflags (name, fixity) = [out dflags (FixitySig [noLoc name] fixity)]
+
+
---------------------------------------------------------------------
-- DOCUMENTATION
@@ -323,3 +383,8 @@ escape = concatMap f
f '>' = "&gt;"
f '&' = "&amp;"
f x = [x]
+
+
+-- | Just like 'vcat' but uses '($+$)' instead of '($$)'.
+vcat' :: [SDoc] -> SDoc
+vcat' = foldr ($+$) empty
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker.hs b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
new file mode 100644
index 00000000..248a8a54
--- /dev/null
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker.hs
@@ -0,0 +1,64 @@
+module Haddock.Backends.Hyperlinker
+ ( ppHyperlinkedSource
+ , module Haddock.Backends.Hyperlinker.Types
+ , module Haddock.Backends.Hyperlinker.Utils
+ ) where
+
+
+import Haddock.Types
+import Haddock.Backends.Hyperlinker.Renderer
+import Haddock.Backends.Hyperlinker.Types
+import Haddock.Backends.Hyperlinker.Utils
+
+import Text.XHtml hiding ((</>))
+
+import Data.Maybe
+import System.Directory
+import System.FilePath
+
+
+-- | Generate hyperlinked source for given interfaces.
+--
+-- Note that list of interfaces should also contain interfaces normally hidden
+-- when generating documentation. Otherwise this could lead to dead links in
+-- produced source.
+ppHyperlinkedSource :: FilePath -- ^ Output directory
+ -> FilePath -- ^ Resource directory
+ -> Maybe FilePath -- ^ Custom CSS file path
+ -> Bool -- ^ Flag indicating whether to pretty-print HTML
+ -> SrcMap -- ^ Paths to sources
+ -> [Interface] -- ^ Interfaces for which we create source
+ -> IO ()
+ppHyperlinkedSource outdir libdir mstyle pretty srcs ifaces = do
+ createDirectoryIfMissing True srcdir
+ let cssFile = fromMaybe (defaultCssFile libdir) mstyle
+ copyFile cssFile $ srcdir </> srcCssFile
+ copyFile (libdir </> "html" </> highlightScript) $
+ srcdir </> highlightScript
+ mapM_ (ppHyperlinkedModuleSource srcdir pretty srcs) ifaces
+ where
+ srcdir = outdir </> hypSrcDir
+
+-- | Generate hyperlinked source for particular interface.
+ppHyperlinkedModuleSource :: FilePath -> Bool -> SrcMap -> Interface
+ -> IO ()
+ppHyperlinkedModuleSource srcdir pretty srcs iface =
+ case ifaceTokenizedSrc iface of
+ Just tokens -> writeFile path . html . render' $ tokens
+ Nothing -> return ()
+ where
+ render' = render (Just srcCssFile) (Just highlightScript) srcs
+ html = if pretty then renderHtml else showHtml
+ path = srcdir </> hypSrcModuleFile (ifaceMod iface)
+
+-- | Name of CSS file in output directory.
+srcCssFile :: FilePath
+srcCssFile = "style.css"
+
+-- | Name of highlight script in output and resource directory.
+highlightScript :: FilePath
+highlightScript = "highlight.js"
+
+-- | Path to default CSS file.
+defaultCssFile :: FilePath -> FilePath
+defaultCssFile libdir = libdir </> "html" </> "solarized.css"
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
new file mode 100644
index 00000000..1f396df5
--- /dev/null
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
@@ -0,0 +1,185 @@
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TypeFamilies #-}
+
+
+module Haddock.Backends.Hyperlinker.Ast (enrich) where
+
+
+import Haddock.Syb
+import Haddock.Backends.Hyperlinker.Types
+
+import qualified GHC
+
+import Control.Applicative
+import Data.Data
+import Data.Maybe
+
+
+-- | Add more detailed information to token stream using GHC API.
+enrich :: GHC.RenamedSource -> [Token] -> [RichToken]
+enrich src =
+ map $ \token -> RichToken
+ { rtkToken = token
+ , rtkDetails = enrichToken token detailsMap
+ }
+ where
+ detailsMap = concatMap ($ src)
+ [ variables
+ , types
+ , decls
+ , binds
+ , imports
+ ]
+
+-- | A map containing association between source locations and "details" of
+-- this location.
+--
+-- For the time being, it is just a list of pairs. However, looking up things
+-- in such structure has linear complexity. We cannot use any hashmap-like
+-- stuff because source locations are not ordered. In the future, this should
+-- be replaced with interval tree data structure.
+type DetailsMap = [(GHC.SrcSpan, TokenDetails)]
+
+lookupBySpan :: Span -> DetailsMap -> Maybe TokenDetails
+lookupBySpan tspan = listToMaybe . map snd . filter (matches tspan . fst)
+
+enrichToken :: Token -> DetailsMap -> Maybe TokenDetails
+enrichToken (Token typ _ spn) dm
+ | typ `elem` [TkIdentifier, TkOperator] = lookupBySpan spn dm
+enrichToken _ _ = Nothing
+
+-- | Obtain details map for variables ("normally" used identifiers).
+variables :: GHC.RenamedSource -> DetailsMap
+variables =
+ everything (<|>) (var `combine` rec)
+ where
+ var term = case cast term of
+ (Just (GHC.L sspan (GHC.HsVar name))) ->
+ pure (sspan, RtkVar (GHC.unLoc name))
+ (Just (GHC.L _ (GHC.RecordCon (GHC.L sspan name) _ _ _))) ->
+ pure (sspan, RtkVar name)
+ _ -> empty
+ rec term = case cast term of
+ Just (GHC.HsRecField (GHC.L sspan name) (_ :: GHC.LHsExpr GHC.Name) _) ->
+ pure (sspan, RtkVar name)
+ _ -> empty
+
+-- | Obtain details map for types.
+types :: GHC.RenamedSource -> DetailsMap
+types =
+ everything (<|>) ty
+ where
+ ty term = case cast term of
+ (Just (GHC.L sspan (GHC.HsTyVar name))) ->
+ pure (sspan, RtkType (GHC.unLoc name))
+ _ -> empty
+
+-- | Obtain details map for identifier bindings.
+--
+-- That includes both identifiers bound by pattern matching or declared using
+-- ordinary assignment (in top-level declarations, let-expressions and where
+-- clauses).
+binds :: GHC.RenamedSource -> DetailsMap
+binds =
+ everything (<|>) (fun `combine` pat `combine` tvar)
+ where
+ fun term = case cast term of
+ (Just (GHC.FunBind (GHC.L sspan name) _ _ _ _ :: GHC.HsBind GHC.Name)) ->
+ pure (sspan, RtkBind name)
+ _ -> empty
+ pat term = case cast term of
+ (Just (GHC.L sspan (GHC.VarPat name))) ->
+ pure (sspan, RtkBind (GHC.unLoc name))
+ (Just (GHC.L _ (GHC.ConPatIn (GHC.L sspan name) recs))) ->
+ [(sspan, RtkVar name)] ++ everything (<|>) rec recs
+ (Just (GHC.L _ (GHC.AsPat (GHC.L sspan name) _))) ->
+ pure (sspan, RtkBind name)
+ _ -> empty
+ rec term = case cast term of
+ (Just (GHC.HsRecField (GHC.L sspan name) (_ :: GHC.LPat GHC.Name) _)) ->
+ pure (sspan, RtkVar name)
+ _ -> empty
+ tvar term = case cast term of
+ (Just (GHC.L sspan (GHC.UserTyVar name))) ->
+ pure (sspan, RtkBind (GHC.unLoc name))
+ (Just (GHC.L _ (GHC.KindedTyVar (GHC.L sspan name) _))) ->
+ pure (sspan, RtkBind name)
+ _ -> empty
+
+-- | Obtain details map for top-level declarations.
+decls :: GHC.RenamedSource -> DetailsMap
+decls (group, _, _, _) = concatMap ($ group)
+ [ concat . map typ . concat . map GHC.group_tyclds . GHC.hs_tyclds
+ , everything (<|>) fun . GHC.hs_valds
+ , everything (<|>) (con `combine` ins)
+ ]
+ where
+ typ (GHC.L _ t) = case t of
+ GHC.DataDecl name _ _ _ -> pure . decl $ name
+ GHC.SynDecl name _ _ _ -> pure . decl $ name
+ GHC.FamDecl fam -> pure . decl $ GHC.fdLName fam
+ GHC.ClassDecl{..} -> [decl tcdLName] ++ concatMap sig tcdSigs
+ fun term = case cast term of
+ (Just (GHC.FunBind (GHC.L sspan name) _ _ _ _ :: GHC.HsBind GHC.Name))
+ | GHC.isExternalName name -> pure (sspan, RtkDecl name)
+ _ -> empty
+ con term = case cast term of
+ (Just cdcl) ->
+ map decl (GHC.con_names cdcl) ++ everything (<|>) fld cdcl
+ Nothing -> empty
+ ins term = case cast term of
+ (Just (GHC.DataFamInstD inst)) -> pure . tyref $ GHC.dfid_tycon inst
+ (Just (GHC.TyFamInstD (GHC.TyFamInstDecl (GHC.L _ eqn) _))) ->
+ pure . tyref $ GHC.tfe_tycon eqn
+ _ -> empty
+ fld term = case cast term of
+ Just (field :: GHC.ConDeclField GHC.Name)
+ -> map (decl . fmap GHC.selectorFieldOcc) $ GHC.cd_fld_names field
+ Nothing -> empty
+ sig (GHC.L _ (GHC.TypeSig names _)) = map decl names
+ sig _ = []
+ decl (GHC.L sspan name) = (sspan, RtkDecl name)
+ tyref (GHC.L sspan name) = (sspan, RtkType name)
+
+-- | Obtain details map for import declarations.
+--
+-- This map also includes type and variable details for items in export and
+-- import lists.
+imports :: GHC.RenamedSource -> DetailsMap
+imports src@(_, imps, _, _) =
+ everything (<|>) ie src ++ mapMaybe (imp . GHC.unLoc) imps
+ where
+ ie term = case cast term of
+ (Just (GHC.IEVar v)) -> pure $ var v
+ (Just (GHC.IEThingAbs t)) -> pure $ typ t
+ (Just (GHC.IEThingAll t)) -> pure $ typ t
+ (Just (GHC.IEThingWith t _ vs _fls)) ->
+ [typ t] ++ map var vs
+ _ -> empty
+ typ (GHC.L sspan name) = (sspan, RtkType name)
+ var (GHC.L sspan name) = (sspan, RtkVar name)
+ imp idecl | not . GHC.ideclImplicit $ idecl =
+ let (GHC.L sspan name) = GHC.ideclName idecl
+ in Just (sspan, RtkModule name)
+ imp _ = Nothing
+
+-- | Check whether token stream span matches GHC source span.
+--
+-- Currently, it is implemented as checking whether "our" span is contained
+-- in GHC span. The reason for that is because GHC span are generally wider
+-- and may spread across couple tokens. For example, @(>>=)@ consists of three
+-- tokens: @(@, @>>=@, @)@, but GHC source span associated with @>>=@ variable
+-- contains @(@ and @)@. Similarly, qualified identifiers like @Foo.Bar.quux@
+-- are tokenized as @Foo@, @.@, @Bar@, @.@, @quux@ but GHC source span
+-- associated with @quux@ contains all five elements.
+matches :: Span -> GHC.SrcSpan -> Bool
+matches tspan (GHC.RealSrcSpan aspan)
+ | saspan <= stspan && etspan <= easpan = True
+ where
+ stspan = (posRow . spStart $ tspan, posCol . spStart $ tspan)
+ etspan = (posRow . spEnd $ tspan, posCol . spEnd $ tspan)
+ saspan = (GHC.srcSpanStartLine aspan, GHC.srcSpanStartCol aspan)
+ easpan = (GHC.srcSpanEndLine aspan, GHC.srcSpanEndCol aspan)
+matches _ _ = False
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
new file mode 100644
index 00000000..e206413e
--- /dev/null
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
@@ -0,0 +1,204 @@
+module Haddock.Backends.Hyperlinker.Parser (parse) where
+
+
+import Data.Char
+import Data.List
+import Data.Maybe
+
+import Haddock.Backends.Hyperlinker.Types
+
+
+-- | Turn source code string into a stream of more descriptive tokens.
+--
+-- Result should retain original file layout (including comments, whitespace,
+-- etc.), i.e. the following "law" should hold:
+--
+-- @concat . map 'tkValue' . 'parse' = id@
+parse :: String -> [Token]
+parse = tokenize . tag . chunk
+
+-- | Split raw source string to more meaningful chunks.
+--
+-- This is the initial stage of tokenization process. Each chunk is either
+-- a comment (including comment delimiters), a whitespace string, preprocessor
+-- macro (and all its content until the end of a line) or valid Haskell lexeme.
+chunk :: String -> [String]
+chunk [] = []
+chunk str@(c:_)
+ | isSpace c =
+ let (space, mcpp, rest) = spanSpaceOrCpp str
+ in [space] ++ maybeToList mcpp ++ chunk rest
+chunk str
+ | "--" `isPrefixOf` str = chunk' $ spanToNewline str
+ | "{-" `isPrefixOf` str = chunk' $ chunkComment 0 str
+ | otherwise = case lex str of
+ (tok:_) -> chunk' tok
+ [] -> [str]
+ where
+ chunk' (c, rest) = c:(chunk rest)
+
+-- | Split input to "first line" string and the rest of it.
+--
+-- Ideally, this should be done simply with @'break' (== '\n')@. However,
+-- Haskell also allows line-unbreaking (or whatever it is called) so things
+-- are not as simple and this function deals with that.
+spanToNewline :: String -> (String, String)
+spanToNewline [] = ([], [])
+spanToNewline ('\\':'\n':str) =
+ let (str', rest) = spanToNewline str
+ in ('\\':'\n':str', rest)
+spanToNewline str@('\n':_) = ("", str)
+spanToNewline (c:str) =
+ let (str', rest) = spanToNewline str
+ in (c:str', rest)
+
+-- | Split input to whitespace string, (optional) preprocessor directive and
+-- the rest of it.
+--
+-- Again, using something like @'span' 'isSpace'@ would be nice to chunk input
+-- to whitespace. The problem is with /#/ symbol - if it is placed at the very
+-- beginning of a line, it should be recognized as preprocessor macro. In any
+-- other case, it is ordinary Haskell symbol and can be used to declare
+-- operators. Hence, while dealing with whitespace we also check whether there
+-- happens to be /#/ symbol just after a newline character - if that is the
+-- case, we begin treating the whole line as preprocessor macro.
+spanSpaceOrCpp :: String -> (String, Maybe String, String)
+spanSpaceOrCpp ('\n':'#':str) =
+ let (str', rest) = spanToNewline str
+ in ("\n", Just $ '#':str', rest)
+spanSpaceOrCpp (c:str')
+ | isSpace c =
+ let (space, mcpp, rest) = spanSpaceOrCpp str'
+ in (c:space, mcpp, rest)
+spanSpaceOrCpp str = ("", Nothing, str)
+
+-- | Split input to comment content (including delimiters) and the rest.
+--
+-- Again, some more logic than simple 'span' is required because of Haskell
+-- comment nesting policy.
+chunkComment :: Int -> String -> (String, String)
+chunkComment _ [] = ("", "")
+chunkComment depth ('{':'-':str) =
+ let (c, rest) = chunkComment (depth + 1) str
+ in ("{-" ++ c, rest)
+chunkComment depth ('-':'}':str)
+ | depth == 1 = ("-}", str)
+ | otherwise =
+ let (c, rest) = chunkComment (depth - 1) str
+ in ("-}" ++ c, rest)
+chunkComment depth (e:str) =
+ let (c, rest) = chunkComment depth str
+ in (e:c, rest)
+
+-- | Assign source location for each chunk in given stream.
+tag :: [String] -> [(Span, String)]
+tag =
+ reverse . snd . foldl aux (Position 1 1, [])
+ where
+ aux (pos, cs) str =
+ let pos' = foldl move pos str
+ in (pos', (Span pos pos', str):cs)
+ move pos '\n' = pos { posRow = posRow pos + 1, posCol = 1 }
+ move pos _ = pos { posCol = posCol pos + 1 }
+
+-- | Turn unrecognised chunk stream to more descriptive token stream.
+tokenize :: [(Span, String)] -> [Token]
+tokenize =
+ map aux
+ where
+ aux (sp, str) = Token
+ { tkType = classify str
+ , tkValue = str
+ , tkSpan = sp
+ }
+
+-- | Classify given string as appropriate Haskell token.
+--
+-- This method is based on Haskell 98 Report lexical structure description:
+-- https://www.haskell.org/onlinereport/lexemes.html
+--
+-- However, this is probably far from being perfect and most probably does not
+-- handle correctly all corner cases.
+classify :: String -> TokenType
+classify str
+ | "--" `isPrefixOf` str = TkComment
+ | "{-#" `isPrefixOf` str = TkPragma
+ | "{-" `isPrefixOf` str = TkComment
+classify str@(c:_)
+ | isSpace c = TkSpace
+ | isDigit c = TkNumber
+ | c `elem` special = TkSpecial
+ | str `elem` glyphs = TkGlyph
+ | all (`elem` symbols) str = TkOperator
+ | c == '#' = TkCpp
+ | c == '"' = TkString
+ | c == '\'' = TkChar
+classify str
+ | str `elem` keywords = TkKeyword
+ | isIdentifier str = TkIdentifier
+ | otherwise = TkUnknown
+
+keywords :: [String]
+keywords =
+ [ "as"
+ , "case"
+ , "class"
+ , "data"
+ , "default"
+ , "deriving"
+ , "do"
+ , "else"
+ , "hiding"
+ , "if"
+ , "import"
+ , "in"
+ , "infix"
+ , "infixl"
+ , "infixr"
+ , "instance"
+ , "let"
+ , "module"
+ , "newtype"
+ , "of"
+ , "qualified"
+ , "then"
+ , "type"
+ , "where"
+ , "forall"
+ , "family"
+ , "mdo"
+ ]
+
+glyphs :: [String]
+glyphs =
+ [ ".."
+ , ":"
+ , "::"
+ , "="
+ , "\\"
+ , "|"
+ , "<-"
+ , "->"
+ , "@"
+ , "~"
+ , "~#"
+ , "=>"
+ , "-"
+ , "!"
+ ]
+
+special :: [Char]
+special = "()[]{},;`"
+
+-- TODO: Add support for any Unicode symbol or punctuation.
+-- source: http://stackoverflow.com/questions/10548170/what-characters-are-permitted-for-haskell-operators
+symbols :: [Char]
+symbols = "!#$%&*+./<=>?@\\^|-~:"
+
+isIdentifier :: String -> Bool
+isIdentifier (s:str)
+ | (isLower' s || isUpper s) && all isAlphaNum' str = True
+ where
+ isLower' c = isLower c || c == '_'
+ isAlphaNum' c = isAlphaNum c || c == '_' || c == '\''
+isIdentifier _ = False
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
new file mode 100644
index 00000000..15793f0c
--- /dev/null
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
@@ -0,0 +1,189 @@
+{-# LANGUAGE RecordWildCards #-}
+
+
+module Haddock.Backends.Hyperlinker.Renderer (render) where
+
+
+import Haddock.Backends.Hyperlinker.Types
+import Haddock.Backends.Hyperlinker.Utils
+
+import qualified GHC
+import qualified Name as GHC
+import qualified Unique as GHC
+
+import System.FilePath.Posix ((</>))
+
+import Data.List
+import Data.Maybe
+import Data.Monoid
+import qualified Data.Map as Map
+
+import Text.XHtml (Html, HtmlAttr, (!))
+import qualified Text.XHtml as Html
+
+
+type StyleClass = String
+
+
+render :: Maybe FilePath -> Maybe FilePath -> SrcMap -> [RichToken]
+ -> Html
+render mcss mjs srcs tokens = header mcss mjs <> body srcs tokens
+
+
+data TokenGroup
+ = GrpNormal Token
+ | GrpRich TokenDetails [Token]
+
+
+-- | Group consecutive tokens pointing to the same element.
+--
+-- We want to render qualified identifiers as one entity. For example,
+-- @Bar.Baz.foo@ consists of 5 tokens (@Bar@, @.@, @Baz@, @.@, @foo@) but for
+-- better user experience when highlighting and clicking links, these tokens
+-- should be regarded as one identifier. Therefore, before rendering we must
+-- group consecutive elements pointing to the same 'GHC.Name' (note that even
+-- dot token has it if it is part of qualified name).
+groupTokens :: [RichToken] -> [TokenGroup]
+groupTokens [] = []
+groupTokens ((RichToken tok Nothing):rest) = (GrpNormal tok):(groupTokens rest)
+groupTokens ((RichToken tok (Just det)):rest) =
+ let (grp, rest') = span same rest
+ in (GrpRich det (tok:(map rtkToken grp))):(groupTokens rest')
+ where
+ same (RichToken _ (Just det')) = det == det'
+ same _ = False
+
+
+body :: SrcMap -> [RichToken] -> Html
+body srcs tokens =
+ Html.body . Html.pre $ hypsrc
+ where
+ hypsrc = mconcat . map (tokenGroup srcs) . groupTokens $ tokens
+
+
+header :: Maybe FilePath -> Maybe FilePath -> Html
+header mcss mjs
+ | isNothing mcss && isNothing mjs = Html.noHtml
+header mcss mjs =
+ Html.header $ css mcss <> js mjs
+ where
+ css Nothing = Html.noHtml
+ css (Just cssFile) = Html.thelink Html.noHtml !
+ [ Html.rel "stylesheet"
+ , Html.thetype "text/css"
+ , Html.href cssFile
+ ]
+ js Nothing = Html.noHtml
+ js (Just scriptFile) = Html.script Html.noHtml !
+ [ Html.thetype "text/javascript"
+ , Html.src scriptFile
+ ]
+
+
+tokenGroup :: SrcMap -> TokenGroup -> Html
+tokenGroup _ (GrpNormal tok@(Token { .. }))
+ | tkType == TkSpace = renderSpace (posRow . spStart $ tkSpan) tkValue
+ | otherwise = tokenSpan tok ! attrs
+ where
+ attrs = [ multiclass . tokenStyle $ tkType ]
+tokenGroup srcs (GrpRich det tokens) =
+ externalAnchor det . internalAnchor det . hyperlink srcs det $ content
+ where
+ content = mconcat . map (richToken det) $ tokens
+
+
+richToken :: TokenDetails -> Token -> Html
+richToken det tok =
+ tokenSpan tok ! [ multiclass style ]
+ where
+ style = (tokenStyle . tkType) tok ++ richTokenStyle det
+
+
+tokenSpan :: Token -> Html
+tokenSpan = Html.thespan . Html.toHtml . tkValue
+
+
+richTokenStyle :: TokenDetails -> [StyleClass]
+richTokenStyle (RtkVar _) = ["hs-var"]
+richTokenStyle (RtkType _) = ["hs-type"]
+richTokenStyle _ = []
+
+tokenStyle :: TokenType -> [StyleClass]
+tokenStyle TkIdentifier = ["hs-identifier"]
+tokenStyle TkKeyword = ["hs-keyword"]
+tokenStyle TkString = ["hs-string"]
+tokenStyle TkChar = ["hs-char"]
+tokenStyle TkNumber = ["hs-number"]
+tokenStyle TkOperator = ["hs-operator"]
+tokenStyle TkGlyph = ["hs-glyph"]
+tokenStyle TkSpecial = ["hs-special"]
+tokenStyle TkSpace = []
+tokenStyle TkComment = ["hs-comment"]
+tokenStyle TkCpp = ["hs-cpp"]
+tokenStyle TkPragma = ["hs-pragma"]
+tokenStyle TkUnknown = []
+
+multiclass :: [StyleClass] -> HtmlAttr
+multiclass = Html.theclass . intercalate " "
+
+externalAnchor :: TokenDetails -> Html -> Html
+externalAnchor (RtkDecl name) content =
+ Html.anchor content ! [ Html.name $ externalAnchorIdent name ]
+externalAnchor _ content = content
+
+internalAnchor :: TokenDetails -> Html -> Html
+internalAnchor (RtkBind name) content =
+ Html.anchor content ! [ Html.name $ internalAnchorIdent name ]
+internalAnchor _ content = content
+
+externalAnchorIdent :: GHC.Name -> String
+externalAnchorIdent = hypSrcNameUrl
+
+internalAnchorIdent :: GHC.Name -> String
+internalAnchorIdent = ("local-" ++) . show . GHC.getKey . GHC.nameUnique
+
+hyperlink :: SrcMap -> TokenDetails -> Html -> Html
+hyperlink srcs details = case rtkName details of
+ Left name ->
+ if GHC.isInternalName name
+ then internalHyperlink name
+ else externalNameHyperlink srcs name
+ Right name -> externalModHyperlink srcs name
+
+internalHyperlink :: GHC.Name -> Html -> Html
+internalHyperlink name content =
+ Html.anchor content ! [ Html.href $ "#" ++ internalAnchorIdent name ]
+
+externalNameHyperlink :: SrcMap -> GHC.Name -> Html -> Html
+externalNameHyperlink (srcs, _) name content = case Map.lookup mdl srcs of
+ Just SrcLocal -> Html.anchor content !
+ [ Html.href $ hypSrcModuleNameUrl mdl name ]
+ Just (SrcExternal path) -> Html.anchor content !
+ [ Html.href $ path </> hypSrcModuleNameUrl mdl name ]
+ Nothing -> content
+ where
+ mdl = GHC.nameModule name
+
+externalModHyperlink :: SrcMap -> GHC.ModuleName -> Html -> Html
+externalModHyperlink (_, srcs) name content = case Map.lookup name srcs of
+ Just SrcLocal -> Html.anchor content !
+ [ Html.href $ hypSrcModuleUrl' name ]
+ Just (SrcExternal path) -> Html.anchor content !
+ [ Html.href $ path </> hypSrcModuleUrl' name ]
+ Nothing -> content
+
+
+renderSpace :: Int -> String -> Html
+renderSpace _ [] = Html.noHtml
+renderSpace line ('\n':rest) = mconcat
+ [ Html.thespan . Html.toHtml $ "\n"
+ , lineAnchor (line + 1)
+ , renderSpace (line + 1) rest
+ ]
+renderSpace line space =
+ let (hspace, rest) = span (/= '\n') space
+ in (Html.thespan . Html.toHtml) hspace <> renderSpace line rest
+
+
+lineAnchor :: Int -> Html
+lineAnchor line = Html.anchor Html.noHtml ! [ Html.name $ hypSrcLineUrl line ]
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs
new file mode 100644
index 00000000..5f4dbc8c
--- /dev/null
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Types.hs
@@ -0,0 +1,85 @@
+module Haddock.Backends.Hyperlinker.Types where
+
+
+import qualified GHC
+
+import Data.Map (Map)
+import qualified Data.Map as Map
+
+
+data Token = Token
+ { tkType :: TokenType
+ , tkValue :: String
+ , tkSpan :: Span
+ }
+
+data Position = Position
+ { posRow :: !Int
+ , posCol :: !Int
+ }
+
+data Span = Span
+ { spStart :: Position
+ , spEnd :: Position
+ }
+
+data TokenType
+ = TkIdentifier
+ | TkKeyword
+ | TkString
+ | TkChar
+ | TkNumber
+ | TkOperator
+ | TkGlyph
+ | TkSpecial
+ | TkSpace
+ | TkComment
+ | TkCpp
+ | TkPragma
+ | TkUnknown
+ deriving (Show, Eq)
+
+
+data RichToken = RichToken
+ { rtkToken :: Token
+ , rtkDetails :: Maybe TokenDetails
+ }
+
+data TokenDetails
+ = RtkVar GHC.Name
+ | RtkType GHC.Name
+ | RtkBind GHC.Name
+ | RtkDecl GHC.Name
+ | RtkModule GHC.ModuleName
+ deriving (Eq)
+
+
+rtkName :: TokenDetails -> Either GHC.Name GHC.ModuleName
+rtkName (RtkVar name) = Left name
+rtkName (RtkType name) = Left name
+rtkName (RtkBind name) = Left name
+rtkName (RtkDecl name) = Left name
+rtkName (RtkModule name) = Right name
+
+
+-- | Path for making cross-package hyperlinks in generated sources.
+--
+-- Used in 'SrcMap' to determine whether module originates in current package
+-- or in an external package.
+data SrcPath
+ = SrcExternal FilePath
+ | SrcLocal
+
+-- | Mapping from modules to cross-package source paths.
+--
+-- This mapping is actually a pair of maps instead of just one map. The reason
+-- for this is because when hyperlinking modules in import lists we have no
+-- 'GHC.Module' available. On the other hand, we can't just use map with
+-- 'GHC.ModuleName' as indices because certain modules may have common name
+-- but originate in different packages. Hence, we use both /rich/ and /poor/
+-- versions, where the /poor/ is just projection of /rich/ one cached in pair
+-- for better performance.
+type SrcMap = (Map GHC.Module SrcPath, Map GHC.ModuleName SrcPath)
+
+mkSrcMap :: Map GHC.Module SrcPath -> SrcMap
+mkSrcMap srcs = (srcs, Map.mapKeys GHC.moduleName srcs)
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
new file mode 100644
index 00000000..9de4a03d
--- /dev/null
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Utils.hs
@@ -0,0 +1,68 @@
+module Haddock.Backends.Hyperlinker.Utils
+ ( hypSrcDir, hypSrcModuleFile, hypSrcModuleFile'
+ , hypSrcModuleUrl, hypSrcModuleUrl'
+ , hypSrcNameUrl
+ , hypSrcLineUrl
+ , hypSrcModuleNameUrl, hypSrcModuleLineUrl
+ , hypSrcModuleUrlFormat
+ , hypSrcModuleNameUrlFormat, hypSrcModuleLineUrlFormat
+ ) where
+
+
+import Haddock.Backends.Xhtml.Utils
+
+import GHC
+import FastString
+import System.FilePath.Posix ((</>))
+
+
+hypSrcDir :: FilePath
+hypSrcDir = "src"
+
+hypSrcModuleFile :: Module -> FilePath
+hypSrcModuleFile = hypSrcModuleFile' . moduleName
+
+hypSrcModuleFile' :: ModuleName -> FilePath
+hypSrcModuleFile' mdl = spliceURL'
+ Nothing (Just mdl) Nothing Nothing moduleFormat
+
+hypSrcModuleUrl :: Module -> String
+hypSrcModuleUrl = hypSrcModuleFile
+
+hypSrcModuleUrl' :: ModuleName -> String
+hypSrcModuleUrl' = hypSrcModuleFile'
+
+hypSrcNameUrl :: Name -> String
+hypSrcNameUrl name = spliceURL
+ Nothing Nothing (Just name) Nothing nameFormat
+
+hypSrcLineUrl :: Int -> String
+hypSrcLineUrl line = spliceURL
+ Nothing Nothing Nothing (Just spn) lineFormat
+ where
+ loc = mkSrcLoc nilFS line 1
+ spn = mkSrcSpan loc loc
+
+hypSrcModuleNameUrl :: Module -> Name -> String
+hypSrcModuleNameUrl mdl name = hypSrcModuleUrl mdl ++ "#" ++ hypSrcNameUrl name
+
+hypSrcModuleLineUrl :: Module -> Int -> String
+hypSrcModuleLineUrl mdl line = hypSrcModuleUrl mdl ++ "#" ++ hypSrcLineUrl line
+
+hypSrcModuleUrlFormat :: String
+hypSrcModuleUrlFormat = hypSrcDir </> moduleFormat
+
+hypSrcModuleNameUrlFormat :: String
+hypSrcModuleNameUrlFormat = hypSrcModuleUrlFormat ++ "#" ++ nameFormat
+
+hypSrcModuleLineUrlFormat :: String
+hypSrcModuleLineUrlFormat = hypSrcModuleUrlFormat ++ "#" ++ lineFormat
+
+moduleFormat :: String
+moduleFormat = "%{MODULE}.html"
+
+nameFormat :: String
+nameFormat = "%{NAME}"
+
+lineFormat :: String
+lineFormat = "line-%{LINE}"
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs
index e9cc3f83..ab6bb41c 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/src/Haddock/Backends/LaTeX.hs
@@ -1,4 +1,5 @@
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
+{-# LANGUAGE RecordWildCards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Backends.LaTeX
@@ -24,10 +25,9 @@ import qualified Pretty
import GHC
import OccName
import Name ( nameOccName )
-import RdrName ( rdrNameOcc, mkRdrUnqual )
+import RdrName ( rdrNameOcc )
import FastString ( unpackFS, unpackLitString, zString )
import Outputable ( panic)
-import PrelNames ( mkUnboundName )
import qualified Data.Map as Map
import System.Directory
@@ -528,14 +528,14 @@ ppDocInstances unicode (i : rest)
(is, rest') = spanWith isUndocdInstance rest
isUndocdInstance :: DocInstance a -> Maybe (InstHead a)
-isUndocdInstance (i,Nothing) = Just i
+isUndocdInstance (i,Nothing,_) = Just i
isUndocdInstance _ = Nothing
-- | Print a possibly commented instance. The instance header is printed inside
-- an 'argBox'. The comment is printed to the right of the box in normal comment
-- style.
ppDocInstance :: Bool -> DocInstance DocName -> LaTeX
-ppDocInstance unicode (instHead, doc) =
+ppDocInstance unicode (instHead, doc, _) =
declWithDoc (ppInstDecl unicode instHead) (fmap docToLaTeX $ fmap _doc doc)
@@ -544,12 +544,13 @@ ppInstDecl unicode instHead = keyword "instance" <+> ppInstHead unicode instHead
ppInstHead :: Bool -> InstHead DocName -> LaTeX
-ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode
-ppInstHead unicode (n, ks, ts, TypeInst rhs) = keyword "type"
- <+> ppAppNameTypes n ks ts unicode
- <+> maybe empty (\t -> equals <+> ppType unicode t) rhs
-ppInstHead _unicode (_n, _ks, _ts, DataInst _dd) =
- error "data instances not supported by --latex yet"
+ppInstHead unicode (InstHead {..}) = case ihdInstType of
+ ClassInst ctx _ _ _ -> ppContextNoLocs ctx unicode <+> typ
+ TypeInst rhs -> keyword "type" <+> typ <+> tibody rhs
+ DataInst _ -> error "data instances not supported by --latex yet"
+ where
+ typ = ppAppNameTypes ihdClsName ihdKinds ihdTypes unicode
+ tibody = maybe empty (\t -> equals <+> ppType unicode t)
lookupAnySubdoc :: (Eq name1) =>
name1 -> [(name1, DocForDecl name2)] -> DocForDecl name2
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 31757eeb..1554a33c 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -36,7 +36,6 @@ import Haddock.GhcUtils
import Control.Monad ( when, unless )
import Data.Char ( toUpper )
-import Data.Functor ( (<$>) )
import Data.List ( sortBy, groupBy, intercalate, isPrefixOf )
import Data.Maybe
import System.FilePath hiding ( (</>) )
@@ -547,7 +546,7 @@ ifaceToHtml maybe_source_url maybe_wiki_url iface unicode qual
synopsis
| no_doc_at_all = noHtml
| otherwise
- = divSynposis $
+ = divSynopsis $
paragraph ! collapseControl "syn" False "caption" << "Synopsis" +++
shortDeclList (
mapMaybe (processExport True linksInfo unicode qual) exports
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index d54f4e16..49149b8c 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -1,4 +1,6 @@
{-# LANGUAGE TransformListComp #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE Rank2Types #-}
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Backends.Html.Decl
@@ -18,7 +20,6 @@ module Haddock.Backends.Xhtml.Decl (
tyvarNames
) where
-
import Haddock.Backends.Xhtml.DocMarkup
import Haddock.Backends.Xhtml.Layout
import Haddock.Backends.Xhtml.Names
@@ -28,7 +29,6 @@ import Haddock.GhcUtils
import Haddock.Types
import Haddock.Doc (combineDocumentation)
-import Control.Applicative
import Data.List ( intersperse, sort )
import qualified Data.Map as Map
import Data.Maybe
@@ -38,8 +38,7 @@ import GHC
import GHC.Exts
import Name
import BooleanFormula
-import RdrName ( rdrNameOcc, mkRdrUnqual )
-import PrelNames ( mkUnboundName )
+import RdrName ( rdrNameOcc )
ppDecl :: Bool -> LinksInfo -> LHsDecl DocName
-> DocForDecl DocName -> [DocInstance DocName] -> [(DocName, Fixity)]
@@ -220,11 +219,32 @@ ppTyName :: Name -> Html
ppTyName = ppName Prefix
+ppSimpleSig :: LinksInfo -> Splice -> Unicode -> Qualification -> SrcSpan
+ -> [DocName] -> HsType DocName
+ -> Html
+ppSimpleSig links splice unicode qual loc names typ =
+ topDeclElem' names $ ppTypeSig True occNames ppTyp unicode
+ where
+ topDeclElem' = topDeclElem links loc splice
+ ppTyp = ppType unicode qual typ
+ occNames = map getOccName names
+
+
--------------------------------------------------------------------------------
-- * Type families
--------------------------------------------------------------------------------
+ppFamilyInfo :: Bool -> FamilyInfo DocName -> Html
+ppFamilyInfo assoc OpenTypeFamily
+ | assoc = keyword "type"
+ | otherwise = keyword "type family"
+ppFamilyInfo assoc DataFamily
+ | assoc = keyword "data"
+ | otherwise = keyword "data family"
+ppFamilyInfo _ (ClosedTypeFamily _) = keyword "type family"
+
+
ppTyFamHeader :: Bool -> Bool -> FamilyDecl DocName
-> Unicode -> Qualification -> Html
ppTyFamHeader summary associated d@(FamilyDecl { fdInfo = info
@@ -243,18 +263,25 @@ ppTyFamHeader summary associated d@(FamilyDecl { fdInfo = info
) <+>
ppFamDeclBinderWithVars summary d <+>
-
- (case result of
- NoSig -> noHtml
- KindSig kind -> dcolon unicode <+> ppLKind unicode qual kind
- TyVarSig (L _ bndr) -> equals <+> ppHsTyVarBndr unicode qual bndr
- ) <+>
+ ppResultSig result unicode qual <+>
(case injectivity of
Nothing -> noHtml
Just (L _ injectivityAnn) -> ppInjectivityAnn unicode qual injectivityAnn
)
+ppResultSig :: FamilyResultSig DocName -> Unicode -> Qualification -> Html
+ppResultSig result unicode qual = case result of
+ NoSig -> noHtml
+ KindSig kind -> dcolon unicode <+> ppLKind unicode qual kind
+ TyVarSig (L _ bndr) -> equals <+> ppHsTyVarBndr unicode qual bndr
+
+ppPseudoFamilyHeader :: Unicode -> Qualification -> PseudoFamilyDecl DocName
+ -> Html
+ppPseudoFamilyHeader unicode qual (PseudoFamilyDecl { .. }) =
+ ppFamilyInfo True pfdInfo <+>
+ ppAppNameTypes (unLoc pfdLName) [] (map unLoc pfdTyVars) unicode qual <+>
+ ppResultSig (unLoc pfdKindSig) unicode qual
ppInjectivityAnn :: Bool -> Qualification -> InjectivityAnn DocName -> Html
ppInjectivityAnn unicode qual (InjectivityAnn lhs rhs) =
@@ -282,7 +309,7 @@ ppTyFam summary associated links instances fixities loc doc decl splice unicode
= subEquations qual $ map (ppTyFamEqn . unLoc) $ fromMaybe [] mb_eqns
| otherwise
- = ppInstances instances docname unicode qual
+ = ppInstances links (OriginFamily docname) instances splice unicode qual
-- Individual equation of a closed type family
ppTyFamEqn TyFamEqn { tfe_tycon = n, tfe_rhs = rhs
@@ -291,6 +318,18 @@ ppTyFam summary associated links instances fixities loc doc decl splice unicode
<+> equals <+> ppType unicode qual (unLoc rhs)
, Nothing, [] )
+
+
+ppPseudoFamilyDecl :: LinksInfo -> Splice -> Unicode -> Qualification
+ -> PseudoFamilyDecl DocName
+ -> Html
+ppPseudoFamilyDecl links splice unicode qual
+ decl@(PseudoFamilyDecl { pfdLName = L loc name, .. }) =
+ wrapper $ ppPseudoFamilyHeader unicode qual decl
+ where
+ wrapper = topDeclElem links loc splice [name]
+
+
--------------------------------------------------------------------------------
-- * Associated Types
--------------------------------------------------------------------------------
@@ -450,6 +489,8 @@ ppClassDecl summary links instances fixities loc d subdocs
| otherwise = classheader +++ docSection Nothing qual d
+++ minimalBit +++ atBit +++ methodBit +++ instancesBit
where
+ sigs = map unLoc lsigs
+
classheader
| any isUserLSig lsigs = topDeclElem links loc splice [nm] (hdr unicode qual <+> keyword "where" <+> fixs)
| otherwise = topDeclElem links loc splice [nm] (hdr unicode qual <+> fixs)
@@ -480,10 +521,10 @@ ppClassDecl summary links instances fixities loc d subdocs
-- there are different subdocs for different names in a single
-- type signature?
- minimalBit = case [ s | L _ (MinimalSig _ (L _ s)) <- lsigs ] of
+ minimalBit = case [ s | MinimalSig _ (L _ s) <- sigs ] of
-- Miminal complete definition = every shown method
And xs : _ | sort [getName n | L _ (Var (L _ n)) <- xs] ==
- sort [getName n | L _ (TypeSig ns _) <- lsigs, L _ n <- ns]
+ sort [getName n | TypeSig ns _ <- sigs, L _ n <- ns]
-> noHtml
-- Minimal complete definition = the only shown method
@@ -503,31 +544,93 @@ ppClassDecl summary links instances fixities loc d subdocs
where wrap | p = parens | otherwise = id
ppMinimal p (Parens x) = ppMinimal p (unLoc x)
- instancesBit = ppInstances instances nm unicode qual
+ instancesBit = ppInstances links (OriginClass nm) instances
+ splice unicode qual
ppClassDecl _ _ _ _ _ _ _ _ _ _ _ = error "declaration type not supported by ppShortClassDecl"
-ppInstances :: [DocInstance DocName] -> DocName -> Unicode -> Qualification -> Html
-ppInstances instances baseName unicode qual
- = subInstances qual instName (map instDecl instances)
+ppInstances :: LinksInfo
+ -> InstOrigin DocName -> [DocInstance DocName]
+ -> Splice -> Unicode -> Qualification
+ -> Html
+ppInstances links origin instances splice unicode qual
+ = subInstances qual instName links True (zipWith instDecl [1..] instances)
+ -- force Splice = True to use line URLs
+ where
+ instName = getOccString origin
+ instDecl :: Int -> DocInstance DocName -> (SubDecl,Located DocName)
+ instDecl no (inst, mdoc, loc) =
+ ((ppInstHead links splice unicode qual mdoc origin no inst), loc)
+
+
+ppInstHead :: LinksInfo -> Splice -> Unicode -> Qualification
+ -> Maybe (MDoc DocName)
+ -> InstOrigin DocName -> Int -> InstHead DocName
+ -> SubDecl
+ppInstHead links splice unicode qual mdoc origin no ihd@(InstHead {..}) =
+ case ihdInstType of
+ ClassInst { .. } ->
+ ( subInstHead iid $ ppContextNoLocs clsiCtx unicode qual <+> typ
+ , mdoc
+ , [subInstDetails iid ats sigs]
+ )
+ where
+ iid = instanceId origin no ihd
+ sigs = ppInstanceSigs links splice unicode qual clsiSigs
+ ats = ppInstanceAssocTys links splice unicode qual clsiAssocTys
+ TypeInst rhs ->
+ (ptype, mdoc, [])
+ where
+ ptype = keyword "type" <+> typ <+> prhs
+ prhs = maybe noHtml (\t -> equals <+> ppType unicode qual t) rhs
+ DataInst dd ->
+ (pdata, mdoc, [])
+ where
+ pdata = keyword "data" <+> typ <+> pdecl
+ pdecl = ppShortDataDecl False True dd unicode qual
+ where
+ typ = ppAppNameTypes ihdClsName ihdKinds ihdTypes unicode qual
+
+
+ppInstanceAssocTys :: LinksInfo -> Splice -> Unicode -> Qualification
+ -> [PseudoFamilyDecl DocName]
+ -> [Html]
+ppInstanceAssocTys links splice unicode qual =
+ map ppFamilyDecl'
where
- instName = getOccString $ getName baseName
- instDecl :: DocInstance DocName -> SubDecl
- instDecl (inst, maybeDoc) = (instHead inst, maybeDoc, [])
- instHead (n, ks, ts, ClassInst cs) = ppContextNoLocs cs unicode qual
- <+> ppAppNameTypes n ks ts unicode qual
- instHead (n, ks, ts, TypeInst rhs) = keyword "type"
- <+> ppAppNameTypes n ks ts unicode qual
- <+> maybe noHtml (\t -> equals <+> ppType unicode qual t) rhs
- instHead (n, ks, ts, DataInst dd) = keyword "data"
- <+> ppAppNameTypes n ks ts unicode qual
- <+> ppShortDataDecl False True dd unicode qual
+ ppFamilyDecl' = ppPseudoFamilyDecl links splice unicode qual
+
+
+ppInstanceSigs :: LinksInfo -> Splice -> Unicode -> Qualification
+ -> [Sig DocName]
+ -> [Html]
+ppInstanceSigs links splice unicode qual sigs = do
+ TypeSig lnames typ <- sigs
+ let names = map unLoc lnames
+ L loc rtyp = get_type typ
+ return $ ppSimpleSig links splice unicode qual loc names rtyp
+ where
+ get_type = hswc_body . hsib_body
+
lookupAnySubdoc :: Eq id1 => id1 -> [(id1, DocForDecl id2)] -> DocForDecl id2
lookupAnySubdoc n = fromMaybe noDocForDecl . lookup n
+instanceId :: InstOrigin DocName -> Int -> InstHead DocName -> String
+instanceId origin no ihd = concat
+ [ qual origin
+ , ":" ++ getOccString origin
+ , ":" ++ (occNameString . getOccName . ihdClsName) ihd
+ , ":" ++ show no
+ ]
+ where
+ qual (OriginClass _) = "ic"
+ qual (OriginData _) = "id"
+ qual (OriginFamily _) = "if"
+
+
-------------------------------------------------------------------------------
-- * Data & newtype declarations
-------------------------------------------------------------------------------
@@ -595,7 +698,8 @@ ppDataDecl summary links instances fixities subdocs loc doc dataDecl
(map unLoc (getConNames (unLoc c)))) fixities
]
- instancesBit = ppInstances instances docname unicode qual
+ instancesBit = ppInstances links (OriginData docname) instances
+ splice unicode qual
@@ -862,8 +966,8 @@ ppr_mono_ty _ (HsRecTy {}) _ _ = toHtml "{..}"
-- placeholder in the signature, which is followed by the field
-- declarations.
ppr_mono_ty _ (HsCoreTy {}) _ _ = error "ppr_mono_ty HsCoreTy"
-ppr_mono_ty _ (HsExplicitListTy _ tys) u q = quote $ brackets $ hsep $ punctuate comma $ map (ppLType u q) tys
-ppr_mono_ty _ (HsExplicitTupleTy _ tys) u q = quote $ parenList $ map (ppLType u q) tys
+ppr_mono_ty _ (HsExplicitListTy _ tys) u q = promoQuote $ brackets $ hsep $ punctuate comma $ map (ppLType u q) tys
+ppr_mono_ty _ (HsExplicitTupleTy _ tys) u q = promoQuote $ parenList $ map (ppLType u q) tys
ppr_mono_ty _ (HsAppsTy {}) _ _ = error "ppr_mono_ty HsAppsTy"
ppr_mono_ty ctxt_prec (HsEqTy ty1 ty2) unicode qual
@@ -878,7 +982,12 @@ ppr_mono_ty ctxt_prec (HsOpTy ty1 op ty2) unicode qual
= maybeParen ctxt_prec pREC_FUN $
ppr_mono_lty pREC_OP ty1 unicode qual <+> ppr_op <+> ppr_mono_lty pREC_OP ty2 unicode qual
where
- ppr_op = ppLDocName qual Infix op
+ -- `(:)` is valid in type signature only as constructor to promoted list
+ -- and needs to be quoted in code so we explicitly quote it here too.
+ ppr_op
+ | (getOccString . getName . unLoc) op == ":" = promoQuote ppr_op'
+ | otherwise = ppr_op'
+ ppr_op' = ppLDocName qual Infix op
ppr_mono_ty ctxt_prec (HsParTy ty) unicode qual
-- = parens (ppr_mono_lty pREC_TOP ty)
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
index 96d734eb..3fe74a82 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
@@ -19,8 +19,6 @@ module Haddock.Backends.Xhtml.DocMarkup (
docElement, docSection, docSection_,
) where
-import Control.Applicative ((<$>))
-
import Data.List
import Haddock.Backends.Xhtml.Names
import Haddock.Backends.Xhtml.Utils
@@ -64,7 +62,10 @@ parHtmlMarkup qual insertAnchors ppId = Markup {
then anchor ! [href url]
<< fromMaybe url mLabel
else toHtml $ fromMaybe url mLabel,
- markupAName = \aname -> namedAnchor aname << "",
+ markupAName = \aname
+ -> if insertAnchors
+ then namedAnchor aname << ""
+ else noHtml,
markupPic = \(Picture uri t) -> image ! ([src uri] ++ fromMaybe [] (return . title <$> t)),
markupProperty = pre . toHtml,
markupExample = examplesToHtml,
@@ -160,8 +161,9 @@ hackMarkup fmt' h' =
UntouchedDoc d -> (markup fmt $ _doc d, [_meta d])
CollapsingHeader (Header lvl titl) par n nm ->
let id_ = makeAnchorId $ "ch:" ++ fromMaybe "noid:" nm ++ show n
- col' = collapseControl id_ True "caption"
- instTable = (thediv ! collapseSection id_ False [] <<)
+ expanded = False
+ col' = collapseControl id_ expanded "caption"
+ instTable = (thediv ! collapseSection id_ expanded [] <<)
lvs = zip [1 .. ] [h1, h2, h3, h4, h5, h6]
getHeader = fromMaybe caption (lookup lvl lvs)
subCaption = getHeader ! col' << markup fmt titl
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
index f1f109c5..d24ed9c4 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs
@@ -14,7 +14,7 @@ module Haddock.Backends.Xhtml.Layout (
miniBody,
divPackageHeader, divContent, divModuleHeader, divFooter,
- divTableOfContents, divDescription, divSynposis, divInterface,
+ divTableOfContents, divDescription, divSynopsis, divInterface,
divIndex, divAlphabet, divModuleList,
sectionName,
@@ -31,7 +31,7 @@ module Haddock.Backends.Xhtml.Layout (
subConstructors,
subEquations,
subFields,
- subInstances,
+ subInstances, subInstHead, subInstDetails,
subMethods,
subMinimal,
@@ -44,7 +44,6 @@ import Haddock.Backends.Xhtml.Types
import Haddock.Backends.Xhtml.Utils
import Haddock.Types
import Haddock.Utils (makeAnchorId)
-
import qualified Data.Map as Map
import Text.XHtml hiding ( name, title, p, quote )
@@ -77,7 +76,7 @@ nonEmptySectionName c
divPackageHeader, divContent, divModuleHeader, divFooter,
- divTableOfContents, divDescription, divSynposis, divInterface,
+ divTableOfContents, divDescription, divSynopsis, divInterface,
divIndex, divAlphabet, divModuleList
:: Html -> Html
@@ -87,7 +86,7 @@ divModuleHeader = sectionDiv "module-header"
divFooter = sectionDiv "footer"
divTableOfContents = sectionDiv "table-of-contents"
divDescription = sectionDiv "description"
-divSynposis = sectionDiv "synopsis"
+divSynopsis = sectionDiv "synopsis"
divInterface = sectionDiv "interface"
divIndex = sectionDiv "index"
divAlphabet = sectionDiv "alphabet"
@@ -128,14 +127,12 @@ divSubDecls cssClass captionName = maybe noHtml wrap
subDlist :: Qualification -> [SubDecl] -> Maybe Html
subDlist _ [] = Nothing
-subDlist qual decls = Just $ dlist << map subEntry decls +++ clearDiv
+subDlist qual decls = Just $ ulist << map subEntry decls
where
subEntry (decl, mdoc, subs) =
- dterm ! [theclass "src"] << decl
- +++
- docElement ddef << (fmap (docToHtml Nothing qual) mdoc +++ subs)
-
- clearDiv = thediv ! [ theclass "clear" ] << noHtml
+ li <<
+ (define ! [theclass "src"] << decl +++
+ docElement thediv << (fmap (docToHtml Nothing qual) mdoc +++ subs))
subTable :: Qualification -> [SubDecl] -> Maybe Html
@@ -149,6 +146,22 @@ subTable qual decls = Just $ table << aboves (concatMap subRow decls)
: map (cell . (td <<)) subs
+-- | Sub table with source information (optional).
+subTableSrc :: Qualification -> LinksInfo -> Bool -> [(SubDecl,Located DocName)] -> Maybe Html
+subTableSrc _ _ _ [] = Nothing
+subTableSrc qual lnks splice decls = Just $ table << aboves (concatMap subRow decls)
+ where
+ subRow ((decl, mdoc, subs),L loc dn) =
+ (td ! [theclass "src clearfix"] <<
+ (thespan ! [theclass "inst-left"] << decl)
+ <+> linkHtml loc dn
+ <->
+ docElement td << fmap (docToHtml Nothing qual) mdoc
+ )
+ : map (cell . (td <<)) subs
+ linkHtml loc@(RealSrcSpan _) dn = links lnks loc splice dn
+ linkHtml _ _ = noHtml
+
subBlock :: [Html] -> Maybe Html
subBlock [] = Nothing
subBlock hs = Just $ toHtml hs
@@ -174,17 +187,43 @@ subEquations :: Qualification -> [SubDecl] -> Html
subEquations qual = divSubDecls "equations" "Equations" . subTable qual
+-- | Generate sub table for instance declarations, with source
subInstances :: Qualification
-> String -- ^ Class name, used for anchor generation
- -> [SubDecl] -> Html
-subInstances qual nm = maybe noHtml wrap . instTable
+ -> LinksInfo -> Bool
+ -> [(SubDecl,Located DocName)] -> Html
+subInstances qual nm lnks splice = maybe noHtml wrap . instTable
where
wrap = (subSection <<) . (subCaption +++)
- instTable = fmap (thediv ! collapseSection id_ True [] <<) . subTable qual
+ instTable = fmap (thediv ! collapseSection id_ True [] <<) . subTableSrc qual lnks splice
subSection = thediv ! [theclass "subs instances"]
subCaption = paragraph ! collapseControl id_ True "caption" << "Instances"
id_ = makeAnchorId $ "i:" ++ nm
+
+subInstHead :: String -- ^ Instance unique id (for anchor generation)
+ -> Html -- ^ Header content (instance name and type)
+ -> Html
+subInstHead iid hdr =
+ expander noHtml <+> hdr
+ where
+ expander = thespan ! collapseControl (instAnchorId iid) False "instance"
+
+
+subInstDetails :: String -- ^ Instance unique id (for anchor generation)
+ -> [Html] -- ^ Associated type contents
+ -> [Html] -- ^ Method contents (pretty-printed signatures)
+ -> Html
+subInstDetails iid ats mets =
+ section << (subAssociatedTypes ats <+> subMethods mets)
+ where
+ section = thediv ! collapseSection (instAnchorId iid) False "inst-details"
+
+
+instAnchorId :: String -> String
+instAnchorId iid = makeAnchorId $ "i:" ++ iid
+
+
subMethods :: [Html] -> Html
subMethods = divSubDecls "methods" "Methods" . subBlock
@@ -200,12 +239,19 @@ declElem = paragraph ! [theclass "src"]
-- a box for top level documented names
-- it adds a source and wiki link at the right hand side of the box
topDeclElem :: LinksInfo -> SrcSpan -> Bool -> [DocName] -> Html -> Html
-topDeclElem ((_,_,sourceMap,lineMap), (_,_,maybe_wiki_url)) loc splice names html =
- declElem << (html <+> srcLink <+> wikiLink)
+topDeclElem lnks loc splice names html =
+ declElem << (html <+> (links lnks loc splice $ head names))
+ -- FIXME: is it ok to simply take the first name?
+
+-- | Adds a source and wiki link at the right hand side of the box.
+-- Name must be documented, otherwise we wouldn't get here.
+links :: LinksInfo -> SrcSpan -> Bool -> DocName -> Html
+links ((_,_,sourceMap,lineMap), (_,_,maybe_wiki_url)) loc splice (Documented n mdl) =
+ (srcLink <+> wikiLink)
where srcLink = let nameUrl = Map.lookup origPkg sourceMap
lineUrl = Map.lookup origPkg lineMap
mUrl | splice = lineUrl
- -- Use the lineUrl as a backup
+ -- Use the lineUrl as a backup
| otherwise = maybe lineUrl Just nameUrl in
case mUrl of
Nothing -> noHtml
@@ -227,10 +273,7 @@ topDeclElem ((_,_,sourceMap,lineMap), (_,_,maybe_wiki_url)) loc splice names htm
origMod = nameModule n
origPkg = moduleUnitId origMod
- -- Name must be documented, otherwise we wouldn't get here
- Documented n mdl = head names
- -- FIXME: is it ok to simply take the first name?
-
fname = case loc of
- RealSrcSpan l -> unpackFS (srcSpanFile l)
- UnhelpfulSpan _ -> error "topDeclElem UnhelpfulSpan"
+ RealSrcSpan l -> unpackFS (srcSpanFile l)
+ UnhelpfulSpan _ -> error "links: UnhelpfulSpan"
+links _ _ _ _ = noHtml
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
index cf12da40..c69710d1 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Names.hs
@@ -110,16 +110,21 @@ ppName notation name = wrapInfix notation (getOccName name) $ toHtml (getOccStri
ppBinder :: Bool -> OccName -> Html
--- The Bool indicates whether we are generating the summary, in which case
--- the binder will be a link to the full definition.
-ppBinder True n = linkedAnchor (nameAnchorId n) << ppBinder' Prefix n
-ppBinder False n = namedAnchor (nameAnchorId n) ! [theclass "def"]
- << ppBinder' Prefix n
+ppBinder = ppBinderWith Prefix
ppBinderInfix :: Bool -> OccName -> Html
-ppBinderInfix True n = linkedAnchor (nameAnchorId n) << ppBinder' Infix n
-ppBinderInfix False n = namedAnchor (nameAnchorId n) ! [theclass "def"]
- << ppBinder' Infix n
+ppBinderInfix = ppBinderWith Infix
+
+ppBinderWith :: Notation -> Bool -> OccName -> Html
+-- 'isRef' indicates whether this is merely a reference from another part of
+-- the documentation or is the actual definition; in the latter case, we also
+-- set the 'id' and 'class' attributes.
+ppBinderWith notation isRef n =
+ linkedAnchor name ! attributes << ppBinder' notation n
+ where
+ name = nameAnchorId n
+ attributes | isRef = []
+ | otherwise = [identifier name, theclass "def"]
ppBinder' :: Notation -> OccName -> Html
ppBinder' notation n = wrapInfix notation n $ ppOccName n
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Themes.hs b/haddock-api/src/Haddock/Backends/Xhtml/Themes.hs
index 79b093ec..10d6ab10 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Themes.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Themes.hs
@@ -18,7 +18,6 @@ module Haddock.Backends.Xhtml.Themes (
import Haddock.Options
-import Control.Applicative
import Control.Monad (liftM)
import Data.Char (toLower)
import Data.Either (lefts, rights)
@@ -206,4 +205,3 @@ liftEither f = either Left (Right . f)
concatEither :: [Either a [b]] -> Either a [b]
concatEither = liftEither concat . sequenceEither
-
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
index cbcbbd6d..98ff4007 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs
@@ -14,14 +14,14 @@ module Haddock.Backends.Xhtml.Utils (
renderToString,
namedAnchor, linkedAnchor,
- spliceURL,
+ spliceURL, spliceURL',
groupId,
(<+>), (<=>), char,
keyword, punctuate,
braces, brackets, pabrackets, parens, parenList, ubxParenList,
- arrow, comma, dcolon, dot, darrow, equals, forallSymbol, quote,
+ arrow, comma, dcolon, dot, darrow, equals, forallSymbol, quote, promoQuote,
hsep, vcat,
@@ -29,7 +29,6 @@ module Haddock.Backends.Xhtml.Utils (
) where
-import Haddock.GhcUtils
import Haddock.Utils
import Data.Maybe
@@ -38,18 +37,31 @@ import Text.XHtml hiding ( name, title, p, quote )
import qualified Text.XHtml as XHtml
import GHC ( SrcSpan(..), srcSpanStartLine, Name )
-import Module ( Module )
+import Module ( Module, ModuleName, moduleName, moduleNameString )
import Name ( getOccString, nameOccName, isValOcc )
+-- | Replace placeholder string elements with provided values.
+--
+-- Used to generate URL for customized external paths, usually provided with
+-- @--source-module@, @--source-entity@ and related command-line arguments.
+--
+-- >>> spliceURL Nothing mmod mname Nothing "output/%{MODULE}.hs#%{NAME}"
+-- "output/Foo.hs#foo"
spliceURL :: Maybe FilePath -> Maybe Module -> Maybe GHC.Name ->
Maybe SrcSpan -> String -> String
-spliceURL maybe_file maybe_mod maybe_name maybe_loc = run
+spliceURL mfile mmod = spliceURL' mfile (moduleName <$> mmod)
+
+
+-- | Same as 'spliceURL' but takes 'ModuleName' instead of 'Module'.
+spliceURL' :: Maybe FilePath -> Maybe ModuleName -> Maybe GHC.Name ->
+ Maybe SrcSpan -> String -> String
+spliceURL' maybe_file maybe_mod maybe_name maybe_loc = run
where
file = fromMaybe "" maybe_file
mdl = case maybe_mod of
Nothing -> ""
- Just m -> moduleString m
+ Just m -> moduleNameString m
(name, kind) =
case maybe_name of
@@ -138,6 +150,11 @@ quote :: Html -> Html
quote h = char '`' +++ h +++ '`'
+-- | Promoted type quote (e.g. @'[a, b]@, @'(a, b, c)@).
+promoQuote :: Html -> Html
+promoQuote h = char '\'' +++ h
+
+
parens, brackets, pabrackets, braces :: Html -> Html
parens h = char '(' +++ h +++ char ')'
brackets h = char '[' +++ h +++ char ']'
@@ -203,7 +220,7 @@ collapseSection id_ state classes = [ identifier sid, theclass cs ]
collapseToggle :: String -> [HtmlAttr]
collapseToggle id_ = [ strAttr "onclick" js ]
where js = "toggleSection('" ++ id_ ++ "')";
-
+
-- | Attributes for an area that toggles a collapsed area,
-- and displays a control.
collapseControl :: String -> Bool -> String -> [HtmlAttr]
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 2e28b0dd..bc293731 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -22,16 +22,13 @@ import Class
import CoAxiom
import ConLike
import Data.Either (lefts, rights)
-import Data.List( partition )
-import Data.Monoid (mempty)
import DataCon
import FamInstEnv
-import Haddock.Types
import HsSyn
import Name
import RdrName ( mkVarUnqual )
import PatSyn
-import SrcLoc ( Located, noLoc, unLoc, noSrcSpan )
+import SrcLoc ( Located, noLoc, unLoc )
import TcType ( tcSplitSigmaTy )
import TyCon
import Type
@@ -43,6 +40,9 @@ import Unique ( getUnique )
import Util ( filterByList, filterOut )
import Var
+import Haddock.Types
+import Haddock.Interface.Specialize
+
-- the main function here! yay!
@@ -99,7 +99,8 @@ tyThingToLHsDecl t = case t of
(synifySigWcType ImplicitizeForAll (dataConUserType dc)))
AConLike (PatSynCon ps) ->
- allOK . SigD $ PatSynSig (synifyName ps) (synifySigType WithinType (patSynType ps))
+ allOK . SigD $ PatSynSig (synifyName ps) (synifySigType WithinType
+ (patSynType ps))
where
withErrs e x = return (e, x)
allOK x = return (mempty, x)
@@ -416,23 +417,38 @@ synifyKindSig :: Kind -> LHsKind Name
synifyKindSig k = synifyType WithinType k
synifyInstHead :: ([TyVar], [PredType], Class, [Type]) -> InstHead Name
-synifyInstHead (_, preds, cls, types) =
- ( getName cls
- , map (unLoc . synifyType WithinType) ks
- , map (unLoc . synifyType WithinType) ts
- , ClassInst $ map (unLoc . synifyType WithinType) preds
- )
- where (ks,ts) = partitionInvisibles (classTyCon cls) id types
+synifyInstHead (_, preds, cls, types) = specializeInstHead $ InstHead
+ { ihdClsName = getName cls
+ , ihdKinds = map (unLoc . synifyType WithinType) ks
+ , ihdTypes = map (unLoc . synifyType WithinType) ts
+ , ihdInstType = ClassInst
+ { clsiCtx = map (unLoc . synifyType WithinType) preds
+ , clsiTyVars = synifyTyVars $ classTyVars cls
+ , clsiSigs = map synifyClsIdSig $ classMethods cls
+ , clsiAssocTys = do
+ (Right (FamDecl fam)) <- map (synifyTyCon Nothing) $ classATs cls
+ pure $ mkPseudoFamilyDecl fam
+ }
+ }
+ where
+ (ks,ts) = partitionInvisibles (classTyCon cls) id types
+ synifyClsIdSig = synifyIdSig DeleteTopLevelQuantification
-- Convert a family instance, this could be a type family or data family
synifyFamInst :: FamInst -> Bool -> Either ErrMsg (InstHead Name)
-synifyFamInst fi opaque =
- let fff = case fi_flavor fi of
- SynFamilyInst | opaque -> return $ TypeInst Nothing
- SynFamilyInst ->
- return . TypeInst . Just . unLoc . synifyType WithinType $ fi_rhs fi
- DataFamilyInst c ->
- synifyTyCon (Just $ famInstAxiom fi) c >>= return . DataInst
- in fff >>= \f' -> return (fi_fam fi , map (unLoc . synifyType WithinType) ks,
- map (unLoc . synifyType WithinType) ts , f')
- where (ks,ts) = partitionInvisibles (famInstTyCon fi) id $ fi_tys fi
+synifyFamInst fi opaque = do
+ ityp' <- ityp $ fi_flavor fi
+ return InstHead
+ { ihdClsName = fi_fam fi
+ , ihdKinds = synifyTypes ks
+ , ihdTypes = synifyTypes ts
+ , ihdInstType = ityp'
+ }
+ where
+ ityp SynFamilyInst | opaque = return $ TypeInst Nothing
+ ityp SynFamilyInst =
+ return . TypeInst . Just . unLoc . synifyType WithinType $ fi_rhs fi
+ ityp (DataFamilyInst c) =
+ DataInst <$> synifyTyCon (Just $ famInstAxiom fi) c
+ (ks,ts) = partitionInvisibles (famInstTyCon fi) id $ fi_tys fi
+ synifyTypes = map (unLoc. synifyType WithinType)
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 2fbc5f82..4e5e008b 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -16,7 +16,6 @@
module Haddock.GhcUtils where
-import Control.Applicative ( (<$>) )
import Control.Arrow
import Data.Function
diff --git a/haddock-api/src/Haddock/Interface/AttachInstances.hs b/haddock-api/src/Haddock/Interface/AttachInstances.hs
index 86a9957c..faf043aa 100644
--- a/haddock-api/src/Haddock/Interface/AttachInstances.hs
+++ b/haddock-api/src/Haddock/Interface/AttachInstances.hs
@@ -33,14 +33,13 @@ import FamInstEnv
import FastString
import GHC
import GhcMonad (withSession)
-import Id
import InstEnv
import MonadUtils (liftIO)
import Name
import Outputable (text, sep, (<+>))
import PrelNames
+import SrcLoc
import TcRnDriver (tcRnGetInfo)
-import TcType (tcSplitSigmaTy)
import TyCon
import TyCoRep
import TysPrim( funTyCon )
@@ -69,25 +68,26 @@ attachToExportItem :: ExportInfo -> Interface -> IfaceMap -> InstIfaceMap
-> Ghc (ExportItem Name)
attachToExportItem expInfo iface ifaceMap instIfaceMap export =
case attachFixities export of
- e@ExportDecl { expItemDecl = L _ (TyClD d) } -> do
+ e@ExportDecl { expItemDecl = L eSpan (TyClD d) } -> do
mb_info <- getAllInfo (tcdName d)
insts <- case mb_info of
Just (_, _, cls_instances, fam_instances) ->
- let fam_insts = [ (synifyFamInst i opaque, n)
+ let fam_insts = [ (synifyFamInst i opaque, doc,spanNameE n (synifyFamInst i opaque) (L eSpan (tcdName d)) )
| i <- sortBy (comparing instFam) fam_instances
- , let n = instLookup instDocMap (getName i) iface ifaceMap instIfaceMap
+ , let n = getName i
+ , let doc = instLookup instDocMap n iface ifaceMap instIfaceMap
, not $ isNameHidden expInfo (fi_fam i)
, not $ any (isTypeHidden expInfo) (fi_tys i)
, let opaque = isTypeHidden expInfo (fi_rhs i)
]
- cls_insts = [ (synifyInstHead i, instLookup instDocMap n iface ifaceMap instIfaceMap)
+ cls_insts = [ (synifyInstHead i, instLookup instDocMap n iface ifaceMap instIfaceMap, spanName n (synifyInstHead i) (L eSpan (tcdName d)))
| let is = [ (instanceSig i, getName i) | i <- cls_instances ]
, (i@(_,_,cls,tys), n) <- sortBy (comparing $ first instHead) is
, not $ isInstanceHidden expInfo cls tys
]
-- fam_insts but with failing type fams filtered out
- cleanFamInsts = [ (fi, n) | (Right fi, n) <- fam_insts ]
- famInstErrs = [ errm | (Left errm, _) <- fam_insts ]
+ cleanFamInsts = [ (fi, n, L l r) | (Right fi, n, L l (Right r)) <- fam_insts ]
+ famInstErrs = [ errm | (Left errm, _, _) <- fam_insts ]
in do
dfs <- getDynFlags
let mkBug = (text "haddock-bug:" <+>) . text
@@ -106,6 +106,18 @@ attachToExportItem expInfo iface ifaceMap instIfaceMap export =
] }
attachFixities e = e
+ -- spanName: attach the location to the name that is the same file as the instance location
+ spanName s (InstHead { ihdClsName = clsn }) (L instL instn) =
+ let s1 = getSrcSpan s
+ sn = if srcSpanFileName_maybe s1 == srcSpanFileName_maybe instL
+ then instn
+ else clsn
+ in L (getSrcSpan s) sn
+ -- spanName on Either
+ spanNameE s (Left e) _ = L (getSrcSpan s) (Left e)
+ spanNameE s (Right ok) linst =
+ let L l r = spanName s ok linst
+ in L l (Right r)
instLookup :: (InstalledInterface -> Map.Map Name a) -> Name
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 7da965ac..c41946f5 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -21,6 +21,9 @@ import Haddock.GhcUtils
import Haddock.Utils
import Haddock.Convert
import Haddock.Interface.LexParseRn
+import Haddock.Backends.Hyperlinker.Types
+import Haddock.Backends.Hyperlinker.Ast as Hyperlinker
+import Haddock.Backends.Hyperlinker.Parser as Hyperlinker
import qualified Data.Map as M
import Data.Map (Map)
@@ -124,6 +127,8 @@ createInterface tm flags modMap instIfaceMap = do
mkAliasMap dflags $ tm_renamed_source tm
modWarn = moduleWarning dflags gre warnings
+ tokenizedSrc <- mkMaybeTokenizedSrc flags tm
+
return $! Interface {
ifaceMod = mdl
, ifaceOrigFilename = msHsFilePath ms
@@ -147,6 +152,7 @@ createInterface tm flags modMap instIfaceMap = do
, ifaceFamInstances = fam_instances
, ifaceHaddockCoverage = coverage
, ifaceWarningMap = warningMap
+ , ifaceTokenizedSrc = tokenizedSrc
}
mkAliasMap :: DynFlags -> Maybe RenamedSource -> M.Map Module ModuleName
@@ -519,7 +525,7 @@ mkExportItems
case findDecl t of
([L l (ValD _)], (doc, _)) -> do
-- Top-level binding without type signature
- export <- hiValExportItem dflags t doc (l `elem` splices) $ M.lookup t fixMap
+ export <- hiValExportItem dflags t l doc (l `elem` splices) $ M.lookup t fixMap
return [export]
(ds, docs_) | decl : _ <- filter (not . isValD . unLoc) ds ->
let declNames = getMainDeclBinder (unL decl)
@@ -622,13 +628,19 @@ hiDecl dflags t = do
O.text "-- Please report this on Haddock issue tracker!"
bugWarn = O.showSDoc dflags . warnLine
-hiValExportItem :: DynFlags -> Name -> DocForDecl Name -> Bool -> Maybe Fixity -> ErrMsgGhc (ExportItem Name)
-hiValExportItem dflags name doc splice fixity = do
+-- | This function is called for top-level bindings without type signatures.
+-- It gets the type signature from GHC and that means it's not going to
+-- have a meaningful 'SrcSpan'. So we pass down 'SrcSpan' for the
+-- declaration and use it instead - 'nLoc' here.
+hiValExportItem :: DynFlags -> Name -> SrcSpan -> DocForDecl Name -> Bool
+ -> Maybe Fixity -> ErrMsgGhc (ExportItem Name)
+hiValExportItem dflags name nLoc doc splice fixity = do
mayDecl <- hiDecl dflags name
case mayDecl of
Nothing -> return (ExportNoDecl name [])
- Just decl -> return (ExportDecl decl doc [] [] fixities splice)
+ Just decl -> return (ExportDecl (fixSpan decl) doc [] [] fixities splice)
where
+ fixSpan (L l t) = L (SrcLoc.combineSrcSpans l nLoc) t
fixities = case fixity of
Just f -> [(name, f)]
Nothing -> []
@@ -739,7 +751,7 @@ fullModuleContents dflags warnings gre (docMap, argMap, subMap, declMap, instMap
| name:_ <- collectHsBindBinders d, Just [L _ (ValD _)] <- M.lookup name declMap =
-- Top-level binding without type signature.
let (doc, _) = lookupDocs name warnings docMap argMap subMap in
- fmap Just (hiValExportItem dflags name doc (l `elem` splices) $ M.lookup name fixMap)
+ fmap Just (hiValExportItem dflags name l doc (l `elem` splices) $ M.lookup name fixMap)
| otherwise = return Nothing
mkExportItem decl@(L l (InstD d))
| Just name <- M.lookup (getInstLoc d) instMap =
@@ -842,6 +854,30 @@ seqList :: [a] -> ()
seqList [] = ()
seqList (x : xs) = x `seq` seqList xs
+mkMaybeTokenizedSrc :: [Flag] -> TypecheckedModule
+ -> ErrMsgGhc (Maybe [RichToken])
+mkMaybeTokenizedSrc flags tm
+ | Flag_HyperlinkedSource `elem` flags = case renamedSource tm of
+ Just src -> do
+ tokens <- liftGhcToErrMsgGhc . liftIO $ mkTokenizedSrc summary src
+ return $ Just tokens
+ Nothing -> do
+ liftErrMsg . tell . pure $ concat
+ [ "Warning: Cannot hyperlink module \""
+ , moduleNameString . ms_mod_name $ summary
+ , "\" because renamed source is not available"
+ ]
+ return Nothing
+ | otherwise = return Nothing
+ where
+ summary = pm_mod_summary . tm_parsed_module $ tm
+
+mkTokenizedSrc :: ModSummary -> RenamedSource -> IO [RichToken]
+mkTokenizedSrc ms src =
+ Hyperlinker.enrich src . Hyperlinker.parse <$> rawSrc
+ where
+ rawSrc = readFile $ msHsFilePath ms
+
-- | Find a stand-alone documentation comment by its name.
findNamedDoc :: String -> [HsDecl Name] -> ErrMsgM (Maybe HsDocString)
findNamedDoc name = search
diff --git a/haddock-api/src/Haddock/Interface/LexParseRn.hs b/haddock-api/src/Haddock/Interface/LexParseRn.hs
index 9c46c700..3c14498c 100644
--- a/haddock-api/src/Haddock/Interface/LexParseRn.hs
+++ b/haddock-api/src/Haddock/Interface/LexParseRn.hs
@@ -18,7 +18,6 @@ module Haddock.Interface.LexParseRn
, processModuleHeader
) where
-import Control.Applicative
import Data.IntSet (toList)
import Data.List
import Documentation.Haddock.Doc (metaDocConcat)
@@ -30,9 +29,9 @@ import Haddock.Interface.ParseModuleHeader
import Haddock.Parser
import Haddock.Types
import Name
-import RdrHsSyn ( setRdrNameSpace )
import Outputable ( showPpr )
import RdrName
+import RnEnv (dataTcOccs)
processDocStrings :: DynFlags -> GlobalRdrEnv -> [HsDocString]
-> Maybe (MDoc Name)
@@ -76,7 +75,13 @@ processModuleHeader dflags gre safety mayStr = do
where
failure = (emptyHaddockModInfo, Nothing)
-
+-- | Takes a 'GlobalRdrEnv' which (hopefully) contains all the
+-- definitions and a parsed comment and we attempt to make sense of
+-- where the identifiers in the comment point to. We're in effect
+-- trying to convert 'RdrName's to 'Name's, with some guesswork and
+-- fallbacks in case we can't locate the identifiers.
+--
+-- See the comments in the source for implementation commentary.
rename :: DynFlags -> GlobalRdrEnv -> Doc RdrName -> Doc Name
rename dflags gre = rn
where
@@ -84,19 +89,36 @@ rename dflags gre = rn
DocAppend a b -> DocAppend (rn a) (rn b)
DocParagraph doc -> DocParagraph (rn doc)
DocIdentifier x -> do
- let choices = dataTcOccs' x
+ -- Generate the choices for the possible kind of thing this
+ -- is.
+ let choices = dataTcOccs x
+ -- Try to look up all the names in the GlobalRdrEnv that match
+ -- the names.
let names = concatMap (\c -> map gre_name (lookupGRE_RdrName c gre)) choices
+
case names of
+ -- We found no names in the env so we start guessing.
[] ->
case choices of
[] -> DocMonospaced (DocString (showPpr dflags x))
- [a] -> outOfScope dflags a
- a:b:_ | isRdrTc a -> outOfScope dflags a
- | otherwise -> outOfScope dflags b
+ -- There was nothing in the environment so we need to
+ -- pick some default from what's available to us. We
+ -- diverge here from the old way where we would default
+ -- to type constructors as we're much more likely to
+ -- actually want anchors to regular definitions than
+ -- type constructor names (such as in #253). So now we
+ -- only get type constructor links if they are actually
+ -- in scope.
+ a:_ -> outOfScope dflags a
+
+ -- There is only one name in the environment that matches so
+ -- use it.
[a] -> DocIdentifier a
- a:b:_ | isTyConName a -> DocIdentifier a | otherwise -> DocIdentifier b
- -- If an id can refer to multiple things, we give precedence to type
- -- constructors.
+ -- But when there are multiple names available, default to
+ -- type constructors: somewhat awfully GHC returns the
+ -- values in the list positionally.
+ a:b:_ | isTyConName a -> DocIdentifier a
+ | otherwise -> DocIdentifier b
DocWarning doc -> DocWarning (rn doc)
DocEmphasis doc -> DocEmphasis (rn doc)
@@ -117,21 +139,14 @@ rename dflags gre = rn
DocString str -> DocString str
DocHeader (Header l t) -> DocHeader $ Header l (rn t)
-dataTcOccs' :: RdrName -> [RdrName]
--- If the input is a data constructor, return both it and a type
--- constructor. This is useful when we aren't sure which we are
--- looking at.
---
--- We use this definition instead of the GHC's to provide proper linking to
--- functions accross modules. See ticket #253 on Haddock Trac.
-dataTcOccs' rdr_name
- | isDataOcc occ = [rdr_name, rdr_name_tc]
- | otherwise = [rdr_name]
- where
- occ = rdrNameOcc rdr_name
- rdr_name_tc = setRdrNameSpace rdr_name tcName
-
-
+-- | Wrap an identifier that's out of scope (i.e. wasn't found in
+-- 'GlobalReaderEnv' during 'rename') in an appropriate doc. Currently
+-- we simply monospace the identifier in most cases except when the
+-- identifier is qualified: if the identifier is qualified then we can
+-- still try to guess and generate anchors accross modules but the
+-- users shouldn't rely on this doing the right thing. See tickets
+-- #253 and #375 on the confusion this causes depending on which
+-- default we pick in 'rename'.
outOfScope :: DynFlags -> RdrName -> Doc a
outOfScope dflags x =
case x of
diff --git a/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs b/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
index d92e8b2a..e7d2a085 100644
--- a/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
+++ b/haddock-api/src/Haddock/Interface/ParseModuleHeader.hs
@@ -11,7 +11,6 @@
-----------------------------------------------------------------------------
module Haddock.Interface.ParseModuleHeader (parseModuleHeader) where
-import Control.Applicative ((<$>))
import Control.Monad (mplus)
import Data.Char
import DynFlags
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs
index 091d9bff..2478ce23 100644
--- a/haddock-api/src/Haddock/Interface/Rename.hs
+++ b/haddock-api/src/Haddock/Interface/Rename.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE RecordWildCards #-}
----------------------------------------------------------------------------
-- |
-- Module : Haddock.Interface.Rename
@@ -12,7 +13,7 @@
module Haddock.Interface.Rename (renameInterface) where
-import Data.Traversable (traverse, Traversable)
+import Data.Traversable (mapM)
import Haddock.GhcUtils
import Haddock.Types
@@ -25,7 +26,6 @@ import Control.Applicative
import Control.Monad hiding (mapM)
import Data.List
import qualified Data.Map as Map hiding ( Map )
-import Data.Traversable (mapM)
import Prelude hiding (mapM)
@@ -287,16 +287,24 @@ renameWildCardInfo (AnonWildCard (L l name)) = AnonWildCard . L l <$> rename na
renameWildCardInfo (NamedWildCard (L l name)) = NamedWildCard . L l <$> rename name
renameInstHead :: InstHead Name -> RnM (InstHead DocName)
-renameInstHead (className, k, types, rest) = do
- className' <- rename className
- k' <- mapM renameType k
- types' <- mapM renameType types
- rest' <- case rest of
- ClassInst cs -> ClassInst <$> mapM renameType cs
+renameInstHead InstHead {..} = do
+ cname <- rename ihdClsName
+ kinds <- mapM renameType ihdKinds
+ types <- mapM renameType ihdTypes
+ itype <- case ihdInstType of
+ ClassInst { .. } -> ClassInst
+ <$> mapM renameType clsiCtx
+ <*> renameLHsQTyVars clsiTyVars
+ <*> mapM renameSig clsiSigs
+ <*> mapM renamePseudoFamilyDecl clsiAssocTys
TypeInst ts -> TypeInst <$> traverse renameType ts
DataInst dd -> DataInst <$> renameTyClD dd
- return (className', k', types', rest')
-
+ return InstHead
+ { ihdClsName = cname
+ , ihdKinds = kinds
+ , ihdTypes = types
+ , ihdInstType = itype
+ }
renameLDecl :: LHsDecl Name -> RnM (LHsDecl DocName)
renameLDecl (L loc d) = return . L loc =<< renameDecl d
@@ -375,6 +383,16 @@ renameFamilyDecl (FamilyDecl { fdInfo = info, fdLName = lname
, fdTyVars = ltyvars', fdResultSig = result'
, fdInjectivityAnn = injectivity' })
+
+renamePseudoFamilyDecl :: PseudoFamilyDecl Name
+ -> RnM (PseudoFamilyDecl DocName)
+renamePseudoFamilyDecl (PseudoFamilyDecl { .. }) = PseudoFamilyDecl
+ <$> renameFamilyInfo pfdInfo
+ <*> renameL pfdLName
+ <*> mapM renameLType pfdTyVars
+ <*> renameFamilyResultSig pfdKindSig
+
+
renameFamilyInfo :: FamilyInfo Name -> RnM (FamilyInfo DocName)
renameFamilyInfo DataFamily = return DataFamily
renameFamilyInfo OpenTypeFamily = return OpenTypeFamily
@@ -553,10 +571,11 @@ renameExportItem item = case item of
decl' <- renameLDecl decl
doc' <- renameDocForDecl doc
subs' <- mapM renameSub subs
- instances' <- forM instances $ \(inst, idoc) -> do
+ instances' <- forM instances $ \(inst, idoc, L l n) -> do
inst' <- renameInstHead inst
+ n' <- rename n
idoc' <- mapM renameDoc idoc
- return (inst', idoc')
+ return (inst', idoc',L l n')
fixities' <- forM fixities $ \(name, fixity) -> do
name' <- lookupRn name
return (name', fixity)
diff --git a/haddock-api/src/Haddock/Interface/Specialize.hs b/haddock-api/src/Haddock/Interface/Specialize.hs
new file mode 100644
index 00000000..ab719fe8
--- /dev/null
+++ b/haddock-api/src/Haddock/Interface/Specialize.hs
@@ -0,0 +1,406 @@
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE Rank2Types #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE RecordWildCards #-}
+
+
+module Haddock.Interface.Specialize
+ ( specializeInstHead
+ ) where
+
+
+import Haddock.Syb
+import Haddock.Types
+
+import GHC
+import Name
+import FastString
+
+import Control.Monad
+import Control.Monad.Trans.Reader
+import Control.Monad.Trans.State
+
+import Data.Data
+import qualified Data.List as List
+import Data.Maybe
+import Data.Map (Map)
+import qualified Data.Map as Map
+import Data.Set (Set)
+import qualified Data.Set as Set
+
+
+-- | Instantiate all occurrences of given name with particular type.
+specialize :: (Eq name, Typeable name)
+ => Data a
+ => name -> HsType name -> a -> a
+specialize name details =
+ everywhere $ mkT step
+ where
+ step (HsTyVar (L _ name')) | name == name' = details
+ step typ = typ
+
+
+-- | Instantiate all occurrences of given names with corresponding types.
+--
+-- It is just a convenience function wrapping 'specialize' that supports more
+-- that one specialization.
+specialize' :: (Eq name, Typeable name)
+ => Data a
+ => [(name, HsType name)] -> a -> a
+specialize' = flip $ foldr (uncurry specialize)
+
+
+-- | Instantiate given binders with corresponding types.
+--
+-- Again, it is just a convenience function around 'specialize'. Note that
+-- length of type list should be the same as the number of binders.
+specializeTyVarBndrs :: (Eq name, DataId name)
+ => Data a
+ => LHsQTyVars name -> [HsType name]
+ -> a -> a
+specializeTyVarBndrs bndrs typs =
+ specialize' $ zip bndrs' typs
+ where
+ bndrs' = map (bname . unLoc) . hsq_explicit $ bndrs
+ bname (UserTyVar (L _ name)) = name
+ bname (KindedTyVar (L _ name) _) = name
+
+
+specializePseudoFamilyDecl :: (Eq name, DataId name)
+ => LHsQTyVars name -> [HsType name]
+ -> PseudoFamilyDecl name
+ -> PseudoFamilyDecl name
+specializePseudoFamilyDecl bndrs typs decl =
+ decl { pfdTyVars = map specializeTyVars (pfdTyVars decl) }
+ where
+ specializeTyVars = specializeTyVarBndrs bndrs typs
+
+
+specializeSig :: forall name . (Eq name, DataId name, SetName name)
+ => LHsQTyVars name -> [HsType name]
+ -> Sig name
+ -> Sig name
+specializeSig bndrs typs (TypeSig lnames typ) =
+ TypeSig lnames (typ { hsib_body = (hsib_body typ) { hswc_body = noLoc typ'}})
+ where
+ true_type :: HsType name
+ true_type = unLoc (hswc_body (hsib_body typ))
+ typ' :: HsType name
+ typ' = rename fv . sugar $ specializeTyVarBndrs bndrs typs true_type
+ fv = foldr Set.union Set.empty . map freeVariables $ typs
+specializeSig _ _ sig = sig
+
+
+-- | Make all details of instance head (signatures, associated types)
+-- specialized to that particular instance type.
+specializeInstHead :: (Eq name, DataId name, SetName name)
+ => InstHead name -> InstHead name
+specializeInstHead ihd@InstHead { ihdInstType = clsi@ClassInst { .. }, .. } =
+ ihd { ihdInstType = instType' }
+ where
+ instType' = clsi
+ { clsiSigs = map specializeSig' clsiSigs
+ , clsiAssocTys = map specializeFamilyDecl' clsiAssocTys
+ }
+ specializeSig' = specializeSig clsiTyVars ihdTypes
+ specializeFamilyDecl' = specializePseudoFamilyDecl clsiTyVars ihdTypes
+specializeInstHead ihd = ihd
+
+
+-- | Make given type use tuple and list literals where appropriate.
+--
+-- After applying 'specialize' function some terms may not use idiomatic list
+-- and tuple literals resulting in types like @[] a@ or @(,,) a b c@. This
+-- can be fixed using 'sugar' function, that will turn such types into @[a]@
+-- and @(a, b, c)@.
+sugar :: forall name. (NamedThing name, DataId name)
+ => HsType name -> HsType name
+sugar =
+ everywhere $ mkT step
+ where
+ step :: HsType name -> HsType name
+ step = sugarOperators . sugarTuples . sugarLists
+
+
+sugarLists :: NamedThing name => HsType name -> HsType name
+sugarLists (HsAppTy (L _ (HsTyVar (L _ name))) ltyp)
+ | isBuiltInSyntax name' && strName == "[]" = HsListTy ltyp
+ where
+ name' = getName name
+ strName = occNameString . nameOccName $ name'
+sugarLists typ = typ
+
+
+sugarTuples :: NamedThing name => HsType name -> HsType name
+sugarTuples typ =
+ aux [] typ
+ where
+ aux apps (HsAppTy (L _ ftyp) atyp) = aux (atyp:apps) ftyp
+ aux apps (HsParTy (L _ typ')) = aux apps typ'
+ aux apps (HsTyVar (L _ name))
+ | isBuiltInSyntax name' && suitable = HsTupleTy HsBoxedTuple apps
+ where
+ name' = getName name
+ strName = occNameString . nameOccName $ name'
+ suitable = case parseTupleArity strName of
+ Just arity -> arity == length apps
+ Nothing -> False
+ aux _ _ = typ
+
+
+sugarOperators :: NamedThing name => HsType name -> HsType name
+sugarOperators (HsAppTy (L _ (HsAppTy (L _ (HsTyVar (L l name))) la)) lb)
+ | isSymOcc $ getOccName name' = mkHsOpTy la (L l name) lb
+ | isBuiltInSyntax name' && getOccString name == "(->)" = HsFunTy la lb
+ where
+ name' = getName name
+sugarOperators typ = typ
+
+
+-- | Compute arity of given tuple operator.
+--
+-- >>> parseTupleArity "(,,)"
+-- Just 3
+--
+-- >>> parseTupleArity "(,,,,)"
+-- Just 5
+--
+-- >>> parseTupleArity "abc"
+-- Nothing
+--
+-- >>> parseTupleArity "()"
+-- Nothing
+parseTupleArity :: String -> Maybe Int
+parseTupleArity ('(':commas) = do
+ n <- parseCommas commas
+ guard $ n /= 0
+ return $ n + 1
+ where
+ parseCommas (',':rest) = (+ 1) <$> parseCommas rest
+ parseCommas ")" = Just 0
+ parseCommas _ = Nothing
+parseTupleArity _ = Nothing
+
+
+-- | Haskell AST type representation.
+--
+-- This type is used for renaming (more below), essentially the ambiguous (!)
+-- version of 'Name'. So, why is this 'FastString' instead of 'OccName'? Well,
+-- it was 'OccName' before, but turned out that 'OccName' sometimes also
+-- contains namespace information, differentiating visually same types.
+--
+-- And 'FastString' is used because it is /visual/ part of 'OccName' - it is
+-- not converted to 'String' or alike to avoid new allocations. Additionally,
+-- since it is stored mostly in 'Set', fast comparison of 'FastString' is also
+-- quite nice.
+type NameRep = FastString
+
+getNameRep :: NamedThing name => name -> NameRep
+getNameRep = occNameFS . getOccName
+
+nameRepString :: NameRep -> String
+nameRepString = unpackFS
+
+stringNameRep :: String -> NameRep
+stringNameRep = mkFastString
+
+setInternalNameRep :: SetName name => NameRep -> name -> name
+setInternalNameRep = setInternalOccName . mkVarOccFS
+
+setInternalOccName :: SetName name => OccName -> name -> name
+setInternalOccName occ name =
+ setName nname' name
+ where
+ nname = getName name
+ nname' = mkInternalName (nameUnique nname) occ (nameSrcSpan nname)
+
+
+-- | Compute set of free variables of given type.
+freeVariables :: forall name. (NamedThing name, DataId name)
+ => HsType name -> Set NameRep
+freeVariables =
+ everythingWithState Set.empty Set.union query
+ where
+ query term ctx = case cast term :: Maybe (HsType name) of
+ Just (HsForAllTy bndrs _) ->
+ (Set.empty, Set.union ctx (bndrsNames bndrs))
+ Just (HsTyVar (L _ name))
+ | getName name `Set.member` ctx -> (Set.empty, ctx)
+ | otherwise -> (Set.singleton $ getNameRep name, ctx)
+ _ -> (Set.empty, ctx)
+ bndrsNames = Set.fromList . map (getName . tyVarName . unLoc)
+
+
+-- | Make given type visually unambiguous.
+--
+-- After applying 'specialize' method, some free type variables may become
+-- visually ambiguous - for example, having @a -> b@ and specializing @a@ to
+-- @(a -> b)@ we get @(a -> b) -> b@ where first occurrence of @b@ refers to
+-- different type variable than latter one. Applying 'rename' function
+-- will fix that type to be visually unambiguous again (making it something
+-- like @(a -> c) -> b@).
+rename :: SetName name => Set NameRep -> HsType name -> HsType name
+rename fv typ = runReader (renameType typ) $ RenameEnv
+ { rneFV = fv
+ , rneCtx = Map.empty
+ }
+
+
+-- | Renaming monad.
+type Rename name = Reader (RenameEnv name)
+
+-- | Binding generation monad.
+type Rebind name = State (RenameEnv name)
+
+data RenameEnv name = RenameEnv
+ { rneFV :: Set NameRep
+ , rneCtx :: Map Name name
+ }
+
+
+renameType :: SetName name => HsType name -> Rename name (HsType name)
+renameType (HsForAllTy bndrs lt) = rebind bndrs $ \bndrs' ->
+ HsForAllTy
+ <$> pure bndrs'
+ <*> renameLType lt
+renameType (HsQualTy lctxt lt) =
+ HsQualTy
+ <$> located renameContext lctxt
+ <*> renameLType lt
+renameType (HsTyVar name) = HsTyVar <$> located renameName name
+renameType (HsAppTy lf la) = HsAppTy <$> renameLType lf <*> renameLType la
+renameType (HsFunTy la lr) = HsFunTy <$> renameLType la <*> renameLType lr
+renameType (HsListTy lt) = HsListTy <$> renameLType lt
+renameType (HsPArrTy lt) = HsPArrTy <$> renameLType lt
+renameType (HsTupleTy srt lt) = HsTupleTy srt <$> mapM renameLType lt
+renameType (HsOpTy la lop lb) =
+ HsOpTy <$> renameLType la <*> located renameName lop <*> renameLType lb
+renameType (HsParTy lt) = HsParTy <$> renameLType lt
+renameType (HsIParamTy ip lt) = HsIParamTy ip <$> renameLType lt
+renameType (HsEqTy la lb) = HsEqTy <$> renameLType la <*> renameLType lb
+renameType (HsKindSig lt lk) = HsKindSig <$> renameLType lt <*> pure lk
+renameType t@(HsSpliceTy _ _) = pure t
+renameType (HsDocTy lt doc) = HsDocTy <$> renameLType lt <*> pure doc
+renameType (HsBangTy bang lt) = HsBangTy bang <$> renameLType lt
+renameType t@(HsRecTy _) = pure t
+renameType t@(HsCoreTy _) = pure t
+renameType (HsExplicitListTy ph ltys) =
+ HsExplicitListTy ph <$> renameLTypes ltys
+renameType (HsExplicitTupleTy phs ltys) =
+ HsExplicitTupleTy phs <$> renameLTypes ltys
+renameType t@(HsTyLit _) = pure t
+renameType (HsWildCardTy wc) = pure (HsWildCardTy wc)
+renameType (HsAppsTy _) = error "HsAppsTy: Only used before renaming"
+
+
+renameLType :: SetName name => LHsType name -> Rename name (LHsType name)
+renameLType = located renameType
+
+
+renameLTypes :: SetName name => [LHsType name] -> Rename name [LHsType name]
+renameLTypes = mapM renameLType
+
+
+renameContext :: SetName name => HsContext name -> Rename name (HsContext name)
+renameContext = renameLTypes
+
+{-
+renameLTyOp :: SetName name => LHsTyOp name -> Rename name (LHsTyOp name)
+renameLTyOp (wrap, lname) = (,) wrap <$> located renameName lname
+-}
+
+
+renameName :: SetName name => name -> Rename name name
+renameName name = do
+ RenameEnv { rneCtx = ctx } <- ask
+ pure $ fromMaybe name (Map.lookup (getName name) ctx)
+
+
+rebind :: SetName name
+ => [LHsTyVarBndr name] -> ([LHsTyVarBndr name] -> Rename name a)
+ -> Rename name a
+rebind lbndrs action = do
+ (lbndrs', env') <- runState (rebindLTyVarBndrs lbndrs) <$> ask
+ local (const env') (action lbndrs')
+
+
+rebindLTyVarBndrs :: SetName name
+ => [LHsTyVarBndr name] -> Rebind name [LHsTyVarBndr name]
+rebindLTyVarBndrs lbndrs = mapM (located rebindTyVarBndr) lbndrs
+
+
+rebindTyVarBndr :: SetName name
+ => HsTyVarBndr name -> Rebind name (HsTyVarBndr name)
+rebindTyVarBndr (UserTyVar (L l name)) =
+ UserTyVar . L l <$> rebindName name
+rebindTyVarBndr (KindedTyVar name kinds) =
+ KindedTyVar <$> located rebindName name <*> pure kinds
+
+
+rebindName :: SetName name => name -> Rebind name name
+rebindName name = do
+ RenameEnv { .. } <- get
+ taken <- takenNames
+ case Map.lookup (getName name) rneCtx of
+ Just name' -> pure name'
+ Nothing | getNameRep name `Set.member` taken -> freshName name
+ Nothing -> reuseName name
+
+
+-- | Generate fresh occurrence name, put it into context and return.
+freshName :: SetName name => name -> Rebind name name
+freshName name = do
+ env@RenameEnv { .. } <- get
+ taken <- takenNames
+ let name' = setInternalNameRep (findFreshName taken rep) name
+ put $ env { rneCtx = Map.insert nname name' rneCtx }
+ return name'
+ where
+ nname = getName name
+ rep = getNameRep nname
+
+
+reuseName :: SetName name => name -> Rebind name name
+reuseName name = do
+ env@RenameEnv { .. } <- get
+ put $ env { rneCtx = Map.insert (getName name) name rneCtx }
+ return name
+
+
+takenNames :: NamedThing name => Rebind name (Set NameRep)
+takenNames = do
+ RenameEnv { .. } <- get
+ return $ Set.union rneFV (ctxElems rneCtx)
+ where
+ ctxElems = Set.fromList . map getNameRep . Map.elems
+
+
+findFreshName :: Set NameRep -> NameRep -> NameRep
+findFreshName taken =
+ fromJust . List.find isFresh . alternativeNames
+ where
+ isFresh = not . flip Set.member taken
+
+
+alternativeNames :: NameRep -> [NameRep]
+alternativeNames name
+ | [_] <- nameRepString name = letterNames ++ alternativeNames' name
+ where
+ letterNames = map (stringNameRep . pure) ['a'..'z']
+alternativeNames name = alternativeNames' name
+
+
+alternativeNames' :: NameRep -> [NameRep]
+alternativeNames' name =
+ [ stringNameRep $ str ++ show i | i :: Int <- [0..] ]
+ where
+ str = nameRepString name
+
+
+located :: Functor f => (a -> f b) -> Located a -> f (Located b)
+located f (L loc e) = L loc <$> f e
+
+
+tyVarName :: HsTyVarBndr name -> name
+tyVarName (UserTyVar name) = unLoc name
+tyVarName (KindedTyVar (L _ name) _) = name
diff --git a/haddock-api/src/Haddock/InterfaceFile.hs b/haddock-api/src/Haddock/InterfaceFile.hs
index 4b66348c..73185092 100644
--- a/haddock-api/src/Haddock/InterfaceFile.hs
+++ b/haddock-api/src/Haddock/InterfaceFile.hs
@@ -14,7 +14,7 @@
-- Reading and writing the .haddock interface file
-----------------------------------------------------------------------------
module Haddock.InterfaceFile (
- InterfaceFile(..), ifUnitId,
+ InterfaceFile(..), ifUnitId, ifModule,
readInterfaceFile, nameCacheFromGhc, freshNameCache, NameCacheAccessor,
writeInterfaceFile, binaryInterfaceVersion, binaryInterfaceVersionCompatibility
) where
@@ -25,7 +25,6 @@ import Haddock.Utils hiding (out)
import Control.Monad
import Data.Array
-import Data.Functor ((<$>))
import Data.IORef
import Data.List
import qualified Data.Map as Map
@@ -52,6 +51,12 @@ data InterfaceFile = InterfaceFile {
}
+ifModule :: InterfaceFile -> Module
+ifModule if_ =
+ case ifInstalledIfaces if_ of
+ [] -> error "empty InterfaceFile"
+ iface:_ -> instMod iface
+
ifUnitId :: InterfaceFile -> UnitId
ifUnitId if_ =
case ifInstalledIfaces if_ of
diff --git a/haddock-api/src/Haddock/Options.hs b/haddock-api/src/Haddock/Options.hs
index e847333e..f84989ef 100644
--- a/haddock-api/src/Haddock/Options.hs
+++ b/haddock-api/src/Haddock/Options.hs
@@ -21,6 +21,7 @@ module Haddock.Options (
optContentsUrl,
optIndexUrl,
optCssFile,
+ optSourceCssFile,
sourceUrls,
wikiUrls,
optDumpInterfaceFile,
@@ -66,6 +67,8 @@ data Flag
| Flag_WikiEntityURL String
| Flag_LaTeX
| Flag_LaTeXStyle String
+ | Flag_HyperlinkedSource
+ | Flag_SourceCss String
| Flag_Help
| Flag_Verbosity String
| Flag_Version
@@ -116,6 +119,10 @@ options backwardsCompat =
Option ['U'] ["use-unicode"] (NoArg Flag_UseUnicode) "use Unicode in HTML output",
Option [] ["hoogle"] (NoArg Flag_Hoogle)
"output for Hoogle; you may want --package-name and --package-version too",
+ Option [] ["hyperlinked-source"] (NoArg Flag_HyperlinkedSource)
+ "generate highlighted and hyperlinked source code (for use with --html)",
+ Option [] ["source-css"] (ReqArg Flag_SourceCss "FILE")
+ "use custom CSS file instead of default one in hyperlinked source",
Option [] ["source-base"] (ReqArg Flag_SourceBaseURL "URL")
"URL for a source code link on the contents\nand index pages",
Option ['s'] (if backwardsCompat then ["source", "source-module"] else ["source-module"])
@@ -239,6 +246,8 @@ optIndexUrl flags = optLast [ url | Flag_UseIndex url <- flags ]
optCssFile :: [Flag] -> Maybe FilePath
optCssFile flags = optLast [ str | Flag_CSS str <- flags ]
+optSourceCssFile :: [Flag] -> Maybe FilePath
+optSourceCssFile flags = optLast [ str | Flag_SourceCss str <- flags ]
sourceUrls :: [Flag] -> (Maybe String, Maybe String, Maybe String, Maybe String)
sourceUrls flags =
diff --git a/haddock-api/src/Haddock/Syb.hs b/haddock-api/src/Haddock/Syb.hs
new file mode 100644
index 00000000..4847e486
--- /dev/null
+++ b/haddock-api/src/Haddock/Syb.hs
@@ -0,0 +1,55 @@
+{-# LANGUAGE Rank2Types #-}
+
+
+module Haddock.Syb
+ ( everything, everythingWithState, everywhere
+ , mkT
+ , combine
+ ) where
+
+
+import Data.Data
+import Control.Applicative
+
+
+-- | Perform a query on each level of a tree.
+--
+-- This is stolen directly from SYB package and copied here to not introduce
+-- additional dependencies.
+everything :: (r -> r -> r) -> (forall a. Data a => a -> r)
+ -> (forall a. Data a => a -> r)
+everything k f x = foldl k (f x) (gmapQ (everything k f) x)
+
+
+-- | Perform a query with state on each level of a tree.
+--
+-- This is the same as 'everything' but allows for stateful computations. In
+-- SYB it is called @everythingWithContext@ but I find this name somewhat
+-- nicer.
+everythingWithState :: s -> (r -> r -> r)
+ -> (forall a. Data a => a -> s -> (r, s))
+ -> (forall a. Data a => a -> r)
+everythingWithState s k f x =
+ let (r, s') = f x s
+ in foldl k r (gmapQ (everythingWithState s' k f) x)
+
+
+-- | Apply transformation on each level of a tree.
+--
+-- Just like 'everything', this is stolen from SYB package.
+everywhere :: (forall a. Data a => a -> a) -> (forall a. Data a => a -> a)
+everywhere f = f . gmapT (everywhere f)
+
+-- | Create generic transformation.
+--
+-- Another function stolen from SYB package.
+mkT :: (Typeable a, Typeable b) => (b -> b) -> (a -> a)
+mkT f = case cast f of
+ Just f' -> f'
+ Nothing -> id
+
+-- | Combine two queries into one using alternative combinator.
+combine :: Alternative f => (forall a. Data a => a -> f r)
+ -> (forall a. Data a => a -> f r)
+ -> (forall a. Data a => a -> f r)
+combine f g x = f x <|> g x
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 6f9b64dd..b837970b 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies #-}
+{-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies, RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
@@ -27,19 +27,23 @@ import Control.Arrow hiding ((<+>))
import Control.DeepSeq
import Data.Typeable
import Data.Map (Map)
+import Data.Data (Data)
import qualified Data.Map as Map
import Documentation.Haddock.Types
import BasicTypes (Fixity(..))
+
import GHC hiding (NoLink)
import DynFlags (Language)
import qualified GHC.LanguageExtensions as LangExt
+import Coercion
+import NameSet
import OccName
import Outputable
-import NameSet (NameSet)
-import Coercion (Coercion)
import Control.Applicative (Applicative(..))
import Control.Monad (ap)
+import Haddock.Backends.Hyperlinker.Types
+
-----------------------------------------------------------------------------
-- * Convenient synonyms
-----------------------------------------------------------------------------
@@ -53,7 +57,6 @@ type SubMap = Map Name [Name]
type DeclMap = Map Name [LHsDecl Name]
type InstMap = Map SrcSpan Name
type FixMap = Map Name Fixity
-type SrcMap = Map UnitId FilePath
type DocPaths = (FilePath, Maybe FilePath) -- paths to HTML and sources
@@ -129,6 +132,10 @@ data Interface = Interface
-- | Warnings for things defined in this module.
, ifaceWarningMap :: !WarningMap
+
+ -- | Tokenized source code of module (avaliable if Haddock is invoked with
+ -- source generation flag).
+ , ifaceTokenizedSrc :: !(Maybe [RichToken])
}
type WarningMap = Map Name (Doc Name)
@@ -270,7 +277,6 @@ unrenameDocForDecl (doc, fnArgsDoc) =
-- | Type of environment used to cross-reference identifiers in the syntax.
type LinkEnv = Map Name Module
-
-- | Extends 'Name' with cross-reference information.
data DocName
= Documented Name Module
@@ -280,7 +286,16 @@ data DocName
| Undocumented Name
-- ^ This thing is not part of the (existing or resulting)
-- documentation, as far as Haddock knows.
- deriving Eq
+ deriving (Eq, Data)
+
+type instance PostRn DocName NameSet = PlaceHolder
+type instance PostRn DocName Fixity = PlaceHolder
+type instance PostRn DocName Bool = PlaceHolder
+type instance PostRn DocName [Name] = PlaceHolder
+
+type instance PostTc DocName Kind = PlaceHolder
+type instance PostTc DocName Type = PlaceHolder
+type instance PostTc DocName Coercion = PlaceHolder
instance NamedThing DocName where
getName (Documented name _) = name
@@ -295,27 +310,106 @@ instance OutputableBndr DocName where
pprPrefixOcc = pprPrefixOcc . getName
pprInfixOcc = pprInfixOcc . getName
+class NamedThing name => SetName name where
+
+ setName :: Name -> name -> name
+
+
+instance SetName Name where
+
+ setName name' _ = name'
+
+
+instance SetName DocName where
+
+ setName name' (Documented _ mdl) = Documented name' mdl
+ setName name' (Undocumented _) = Undocumented name'
+
+
+
-----------------------------------------------------------------------------
-- * Instances
-----------------------------------------------------------------------------
-- | The three types of instances
data InstType name
- = ClassInst [HsType name] -- ^ Context
+ = ClassInst
+ { clsiCtx :: [HsType name]
+ , clsiTyVars :: LHsQTyVars name
+ , clsiSigs :: [Sig name]
+ , clsiAssocTys :: [PseudoFamilyDecl name]
+ }
| TypeInst (Maybe (HsType name)) -- ^ Body (right-hand side)
| DataInst (TyClDecl name) -- ^ Data constructors
instance OutputableBndr a => Outputable (InstType a) where
- ppr (ClassInst a) = text "ClassInst" <+> ppr a
+ ppr (ClassInst { .. }) = text "ClassInst"
+ <+> ppr clsiCtx
+ <+> ppr clsiTyVars
+ <+> ppr clsiSigs
ppr (TypeInst a) = text "TypeInst" <+> ppr a
ppr (DataInst a) = text "DataInst" <+> ppr a
--- | An instance head that may have documentation.
-type DocInstance name = (InstHead name, Maybe (MDoc name))
+
+-- | Almost the same as 'FamilyDecl' except for type binders.
+--
+-- In order to perform type specialization for class instances, we need to
+-- substitute class variables to appropriate type. However, type variables in
+-- associated type are specified using 'LHsTyVarBndrs' instead of 'HsType'.
+-- This makes type substitution impossible and to overcome this issue,
+-- 'PseudoFamilyDecl' type is introduced.
+data PseudoFamilyDecl name = PseudoFamilyDecl
+ { pfdInfo :: FamilyInfo name
+ , pfdLName :: Located name
+ , pfdTyVars :: [LHsType name]
+ , pfdKindSig :: LFamilyResultSig name
+ }
+
+
+mkPseudoFamilyDecl :: FamilyDecl name -> PseudoFamilyDecl name
+mkPseudoFamilyDecl (FamilyDecl { .. }) = PseudoFamilyDecl
+ { pfdInfo = fdInfo
+ , pfdLName = fdLName
+ , pfdTyVars = [ L loc (mkType bndr) | L loc bndr <- hsq_explicit fdTyVars ]
+ , pfdKindSig = fdResultSig
+ }
+ where
+ mkType (KindedTyVar (L loc name) lkind) =
+ HsKindSig tvar lkind
+ where
+ tvar = L loc (HsTyVar (L loc name))
+ mkType (UserTyVar name) = HsTyVar name
+
+
+-- | An instance head that may have documentation and a source location.
+type DocInstance name = (InstHead name, Maybe (MDoc name), Located name)
-- | The head of an instance. Consists of a class name, a list of kind
-- parameters, a list of type parameters and an instance type
-type InstHead name = (name, [HsType name], [HsType name], InstType name)
+data InstHead name = InstHead
+ { ihdClsName :: name
+ , ihdKinds :: [HsType name]
+ , ihdTypes :: [HsType name]
+ , ihdInstType :: InstType name
+ }
+
+
+-- | An instance origin information.
+--
+-- This is used primarily in HTML backend to generate unique instance
+-- identifiers (for expandable sections).
+data InstOrigin name
+ = OriginClass name
+ | OriginData name
+ | OriginFamily name
+
+
+instance NamedThing name => NamedThing (InstOrigin name) where
+
+ getName (OriginClass name) = getName name
+ getName (OriginData name) = getName name
+ getName (OriginFamily name) = getName name
+
-----------------------------------------------------------------------------
-- * Documentation comments
diff --git a/haddock-api/src/Haddock/Version.hs b/haddock-api/src/Haddock/Version.hs
index 2ef3a257..4e9a581a 100644
--- a/haddock-api/src/Haddock/Version.hs
+++ b/haddock-api/src/Haddock/Version.hs
@@ -9,7 +9,7 @@
-- Stability : experimental
-- Portability : portable
-----------------------------------------------------------------------------
-module Haddock.Version (
+module Haddock.Version (
projectName, projectVersion, projectUrl
) where
diff --git a/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs
new file mode 100644
index 00000000..8cd2690e
--- /dev/null
+++ b/haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs
@@ -0,0 +1,98 @@
+module Haddock.Backends.Hyperlinker.ParserSpec (main, spec) where
+
+
+import Test.Hspec
+import Test.QuickCheck
+
+import Haddock.Backends.Hyperlinker.Parser
+import Haddock.Backends.Hyperlinker.Types
+
+
+main :: IO ()
+main = hspec spec
+
+
+spec :: Spec
+spec = do
+ describe "parse" parseSpec
+
+
+parseSpec :: Spec
+parseSpec = do
+
+ it "is total" $
+ property $ \src -> length (parse src) `shouldSatisfy` (>= 0)
+
+ it "retains file layout" $
+ property $ \src -> concatMap tkValue (parse src) == src
+
+ context "when parsing single-line comments" $ do
+
+ it "should ignore content until the end of line" $
+ "-- some very simple comment\nidentifier"
+ `shouldParseTo`
+ [TkComment, TkSpace, TkIdentifier]
+
+ it "should allow endline escaping" $
+ "-- first line\\\nsecond line\\\nand another one"
+ `shouldParseTo`
+ [TkComment]
+
+ context "when parsing multi-line comments" $ do
+
+ it "should support nested comments" $
+ "{- comment {- nested -} still comment -} {- next comment -}"
+ `shouldParseTo`
+ [TkComment, TkSpace, TkComment]
+
+ it "should distinguish compiler pragma" $
+ "{- comment -}{-# LANGUAGE GADTs #-}{- comment -}"
+ `shouldParseTo`
+ [TkComment, TkPragma, TkComment]
+
+ it "should recognize preprocessor directives" $ do
+ "\n#define foo bar" `shouldParseTo` [TkSpace, TkCpp]
+ "x # y" `shouldParseTo`
+ [TkIdentifier, TkSpace, TkOperator, TkSpace,TkIdentifier]
+
+ it "should distinguish basic language constructs" $ do
+ "(* 2) <$> (\"abc\", foo)" `shouldParseTo`
+ [ TkSpecial, TkOperator, TkSpace, TkNumber, TkSpecial
+ , TkSpace, TkOperator, TkSpace
+ , TkSpecial, TkString, TkSpecial, TkSpace, TkIdentifier, TkSpecial
+ ]
+ "let foo' = foo in foo' + foo'" `shouldParseTo`
+ [ TkKeyword, TkSpace, TkIdentifier
+ , TkSpace, TkGlyph, TkSpace
+ , TkIdentifier, TkSpace, TkKeyword, TkSpace
+ , TkIdentifier, TkSpace, TkOperator, TkSpace, TkIdentifier
+ ]
+ "square x = y^2 where y = x" `shouldParseTo`
+ [ TkIdentifier, TkSpace, TkIdentifier
+ , TkSpace, TkGlyph, TkSpace
+ , TkIdentifier, TkOperator, TkNumber
+ , TkSpace, TkKeyword, TkSpace
+ , TkIdentifier, TkSpace, TkGlyph, TkSpace, TkIdentifier
+ ]
+
+ it "should parse do-notation syntax" $ do
+ "do { foo <- getLine; putStrLn foo }" `shouldParseTo`
+ [ TkKeyword, TkSpace, TkSpecial, TkSpace
+ , TkIdentifier, TkSpace, TkGlyph, TkSpace
+ , TkIdentifier, TkSpecial, TkSpace
+ , TkIdentifier, TkSpace, TkIdentifier, TkSpace, TkSpecial
+ ]
+
+ unlines
+ [ "do"
+ , " foo <- getLine"
+ , " putStrLn foo"
+ ] `shouldParseTo`
+ [ TkKeyword, TkSpace, TkIdentifier
+ , TkSpace, TkGlyph, TkSpace, TkIdentifier, TkSpace
+ , TkIdentifier, TkSpace, TkIdentifier, TkSpace
+ ]
+
+
+shouldParseTo :: String -> [TokenType] -> Expectation
+str `shouldParseTo` tokens = map tkType (parse str) `shouldBe` tokens
diff --git a/haddock-api/test/Spec.hs b/haddock-api/test/Spec.hs
new file mode 100644
index 00000000..a824f8c3
--- /dev/null
+++ b/haddock-api/test/Spec.hs
@@ -0,0 +1 @@
+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
diff --git a/haddock-library/LICENSE b/haddock-library/LICENSE
index 1636bfcd..460decfc 100644
--- a/haddock-library/LICENSE
+++ b/haddock-library/LICENSE
@@ -5,11 +5,11 @@ modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
diff --git a/haddock-library/haddock-library.cabal b/haddock-library/haddock-library.cabal
index d21b851e..f60501f5 100644
--- a/haddock-library/haddock-library.cabal
+++ b/haddock-library/haddock-library.cabal
@@ -1,5 +1,5 @@
name: haddock-library
-version: 1.2.0
+version: 1.2.1
synopsis: Library exposing some functionality of Haddock.
description: Haddock is a documentation-generation tool for Haskell
libraries. These modules expose some functionality of it
@@ -21,7 +21,7 @@ library
default-language: Haskell2010
build-depends:
- base >= 4.3 && < 4.10
+ base >= 4.5 && < 4.10
, bytestring
, transformers
, deepseq
diff --git a/haddock-library/src/Documentation/Haddock/Parser.hs b/haddock-library/src/Documentation/Haddock/Parser.hs
index b7ab85b0..ca9e9d8d 100644
--- a/haddock-library/src/Documentation/Haddock/Parser.hs
+++ b/haddock-library/src/Documentation/Haddock/Parser.hs
@@ -93,7 +93,8 @@ parseParas input = case parseParasState input of
}
parseParasState :: String -> (ParserState, DocH mod Identifier)
-parseParasState = parse (p <* skipSpace) . encodeUtf8 . (++ "\n")
+parseParasState =
+ parse (p <* skipSpace) . encodeUtf8 . (++ "\n") . filter (/= '\r')
where
p :: Parser (DocH mod Identifier)
p = docConcat <$> paragraph `sepBy` many (skipHorizontalSpace *> "\n")
@@ -105,7 +106,7 @@ parseParagraphs input = case parseParasState input of
-- | Parse a text paragraph. Actually just a wrapper over 'parseStringBS' which
-- drops leading whitespace and encodes the string to UTF8 first.
parseString :: String -> DocH mod Identifier
-parseString = parseStringBS . encodeUtf8 . dropWhile isSpace
+parseString = parseStringBS . encodeUtf8 . dropWhile isSpace . filter (/= '\r')
parseStringBS :: BS.ByteString -> DocH mod Identifier
parseStringBS = snd . parse p
@@ -230,18 +231,20 @@ markdownImage = fromHyperlink <$> ("!" *> linkParser)
-- | Paragraph parser, called by 'parseParas'.
paragraph :: Parser (DocH mod Identifier)
-paragraph = examples <|> skipSpace *> (
- since
- <|> unorderedList
- <|> orderedList
- <|> birdtracks
- <|> codeblock
- <|> property
- <|> header
- <|> textParagraphThatStartsWithMarkdownLink
- <|> definitionList
- <|> docParagraph <$> textParagraph
- )
+paragraph = examples <|> do
+ indent <- takeIndent
+ choice
+ [ since
+ , unorderedList indent
+ , orderedList indent
+ , birdtracks
+ , codeblock
+ , property
+ , header
+ , textParagraphThatStartsWithMarkdownLink
+ , definitionList indent
+ , docParagraph <$> textParagraph
+ ]
since :: Parser (DocH mod a)
since = ("@since " *> version <* skipHorizontalSpace <* endOfLine) >>= setSince >> return DocEmpty
@@ -282,16 +285,16 @@ textParagraphThatStartsWithMarkdownLink = docParagraph <$> (docAppend <$> markdo
| otherwise = " "
-- | Parses unordered (bullet) lists.
-unorderedList :: Parser (DocH mod Identifier)
-unorderedList = DocUnorderedList <$> p
+unorderedList :: BS.ByteString -> Parser (DocH mod Identifier)
+unorderedList indent = DocUnorderedList <$> p
where
- p = ("*" <|> "-") *> innerList p
+ p = ("*" <|> "-") *> innerList indent p
-- | Parses ordered lists (numbered or dashed).
-orderedList :: Parser (DocH mod Identifier)
-orderedList = DocOrderedList <$> p
+orderedList :: BS.ByteString -> Parser (DocH mod Identifier)
+orderedList indent = DocOrderedList <$> p
where
- p = (paren <|> dot) *> innerList p
+ p = (paren <|> dot) *> innerList indent p
dot = (decimal :: Parser Int) <* "."
paren = "(" *> decimal <* ")"
@@ -300,23 +303,24 @@ orderedList = DocOrderedList <$> p
-- same paragraph. Usually used as
--
-- > someListFunction = listBeginning *> innerList someListFunction
-innerList :: Parser [DocH mod Identifier] -> Parser [DocH mod Identifier]
-innerList item = do
+innerList :: BS.ByteString -> Parser [DocH mod Identifier]
+ -> Parser [DocH mod Identifier]
+innerList indent item = do
c <- takeLine
- (cs, items) <- more item
+ (cs, items) <- more indent item
let contents = docParagraph . parseString . dropNLs . unlines $ c : cs
return $ case items of
Left p -> [contents `docAppend` p]
Right i -> contents : i
-- | Parses definition lists.
-definitionList :: Parser (DocH mod Identifier)
-definitionList = DocDefList <$> p
+definitionList :: BS.ByteString -> Parser (DocH mod Identifier)
+definitionList indent = DocDefList <$> p
where
p = do
label <- "[" *> (parseStringBS <$> takeWhile1 (`notElem` ("]\n" :: String))) <* ("]" <* optional ":")
c <- takeLine
- (cs, items) <- more p
+ (cs, items) <- more indent p
let contents = parseString . dropNLs . unlines $ c : cs
return $ case items of
Left x -> [(label, contents `docAppend` x)]
@@ -329,32 +333,40 @@ dropNLs = reverse . dropWhile (== '\n') . reverse
-- | Main worker for 'innerList' and 'definitionList'.
-- We need the 'Either' here to be able to tell in the respective functions
-- whether we're dealing with the next list or a nested paragraph.
-more :: Monoid a => Parser a
+more :: Monoid a => BS.ByteString -> Parser a
-> Parser ([String], Either (DocH mod Identifier) a)
-more item = innerParagraphs <|> moreListItems item
- <|> moreContent item <|> pure ([], Right mempty)
+more indent item = innerParagraphs indent
+ <|> moreListItems indent item
+ <|> moreContent indent item
+ <|> pure ([], Right mempty)
-- | Used by 'innerList' and 'definitionList' to parse any nested paragraphs.
-innerParagraphs :: Parser ([String], Either (DocH mod Identifier) a)
-innerParagraphs = (,) [] . Left <$> ("\n" *> indentedParagraphs)
+innerParagraphs :: BS.ByteString
+ -> Parser ([String], Either (DocH mod Identifier) a)
+innerParagraphs indent = (,) [] . Left <$> ("\n" *> indentedParagraphs indent)
-- | Attempts to fetch the next list if possibly. Used by 'innerList' and
-- 'definitionList' to recursively grab lists that aren't separated by a whole
-- paragraph.
-moreListItems :: Parser a
+moreListItems :: BS.ByteString -> Parser a
-> Parser ([String], Either (DocH mod Identifier) a)
-moreListItems item = (,) [] . Right <$> (skipSpace *> item)
+moreListItems indent item = (,) [] . Right <$> indentedItem
+ where
+ indentedItem = string indent *> skipSpace *> item
-- | Helper for 'innerList' and 'definitionList' which simply takes
-- a line of text and attempts to parse more list content with 'more'.
-moreContent :: Monoid a => Parser a
+moreContent :: Monoid a => BS.ByteString -> Parser a
-> Parser ([String], Either (DocH mod Identifier) a)
-moreContent item = first . (:) <$> nonEmptyLine <*> more item
+moreContent indent item = first . (:) <$> nonEmptyLine <*> more indent item
-- | Parses an indented paragraph.
-- The indentation is 4 spaces.
-indentedParagraphs :: Parser (DocH mod Identifier)
-indentedParagraphs = (concat <$> dropFrontOfPara " ") >>= parseParagraphs
+indentedParagraphs :: BS.ByteString -> Parser (DocH mod Identifier)
+indentedParagraphs indent =
+ (concat <$> dropFrontOfPara indent') >>= parseParagraphs
+ where
+ indent' = string $ BS.append indent " "
-- | Grab as many fully indented paragraphs as we can.
dropFrontOfPara :: Parser BS.ByteString -> Parser [String]
@@ -381,6 +393,15 @@ takeNonEmptyLine :: Parser String
takeNonEmptyLine = do
(++ "\n") . decodeUtf8 <$> (takeWhile1 (/= '\n') >>= nonSpace) <* "\n"
+-- | Takes indentation of first non-empty line.
+--
+-- More precisely: skips all whitespace-only lines and returns indentation
+-- (horizontal space, might be empty) of that non-empty line.
+takeIndent :: Parser BS.ByteString
+takeIndent = do
+ indent <- takeHorizontalSpace
+ "\n" *> takeIndent <|> return indent
+
-- | Blocks of text of the form:
--
-- >> foo
diff --git a/haddock-library/test/Documentation/Haddock/ParserSpec.hs b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
index 44ec2988..2ef414fb 100644
--- a/haddock-library/test/Documentation/Haddock/ParserSpec.hs
+++ b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedStrings, FlexibleInstances #-}
+{-# LANGUAGE LambdaCase #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Documentation.Haddock.ParserSpec (main, spec) where
@@ -55,8 +56,10 @@ spec = do
it "accepts hexadecimal character references" $ do
"&#x65;" `shouldParseTo` "e"
- it "allows to backslash-escape characters" $ do
- property $ \x -> ['\\', x] `shouldParseTo` DocString [x]
+ it "allows to backslash-escape characters except \\r" $ do
+ property $ \case
+ '\r' -> "\\\r" `shouldParseTo` DocString "\\"
+ x -> ['\\', x] `shouldParseTo` DocString [x]
context "when parsing strings contaning numeric character references" $ do
it "will implicitly convert digits to characters" $ do
@@ -693,6 +696,23 @@ spec = do
]
<> DocOrderedList [ DocParagraph "baz" ]
+ it "allows arbitrary initial indent of a list" $ do
+ unlines
+ [ " * foo"
+ , " * bar"
+ , ""
+ , " * quux"
+ , ""
+ , " * baz"
+ ]
+ `shouldParseTo`
+ DocUnorderedList
+ [ DocParagraph "foo"
+ , DocParagraph "bar"
+ <> DocUnorderedList [ DocParagraph "quux" ]
+ , DocParagraph "baz"
+ ]
+
it "definition lists can come back to top level with a different list" $ do
"[foo]: foov\n\n [bar]: barv\n\n1. baz" `shouldParseTo`
DocDefList [ ("foo", "foov"
diff --git a/haddock.cabal b/haddock.cabal
index dc331b2f..ec2a43bc 100644
--- a/haddock.cabal
+++ b/haddock.cabal
@@ -1,5 +1,5 @@
name: haddock
-version: 2.16.0
+version: 2.16.2
synopsis: A documentation-generation tool for Haskell libraries
description: Haddock is a documentation-generation tool for Haskell
libraries
@@ -29,6 +29,8 @@ extra-source-files:
haddock-api/src/haddock.sh
html-test/src/*.hs
html-test/ref/*.html
+ hypsrc-test/src/*.hs
+ hypsrc-test/ref/*.html
latex-test/src/Simple/*.hs
latex-test/ref/Simple/*.tex
latex-test/ref/Simple/*.sty
@@ -42,7 +44,7 @@ executable haddock
default-language: Haskell2010
main-is: Main.hs
hs-source-dirs: driver
- ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2
+ ghc-options: -funbox-strict-fields -Wall -fwarn-tabs -O2 -threaded
build-depends:
base >= 4.3 && < 4.10
@@ -89,6 +91,7 @@ executable haddock
Haddock.Interface.AttachInstances
Haddock.Interface.LexParseRn
Haddock.Interface.ParseModuleHeader
+ Haddock.Interface.Specialize
Haddock.Parser
Haddock.Utils
Haddock.Backends.Xhtml
@@ -102,6 +105,12 @@ executable haddock
Haddock.Backends.LaTeX
Haddock.Backends.HaddockDB
Haddock.Backends.Hoogle
+ Haddock.Backends.Hyperlinker
+ Haddock.Backends.Hyperlinker.Ast
+ Haddock.Backends.Hyperlinker.Parser
+ Haddock.Backends.Hyperlinker.Renderer
+ Haddock.Backends.Hyperlinker.Types
+ Haddock.Backends.Hyperlinker.Utils
Haddock.ModuleTree
Haddock.Types
Haddock.Doc
@@ -109,9 +118,10 @@ executable haddock
Haddock.InterfaceFile
Haddock.Options
Haddock.GhcUtils
+ Haddock.Syb
Haddock.Convert
else
- build-depends: haddock-api == 2.16.0
+ build-depends: haddock-api == 2.16.*
test-suite html-test
type: exitcode-stdio-1.0
@@ -120,6 +130,14 @@ test-suite html-test
hs-source-dirs: html-test
build-depends: base, directory, process, filepath, Cabal
+test-suite hypsrc-test
+ type: exitcode-stdio-1.0
+ default-language: Haskell2010
+ main-is: run.hs
+ hs-source-dirs: hypsrc-test
+ build-depends: base, directory, process, filepath, Cabal
+ ghc-options: -Wall -fwarn-tabs
+
test-suite latex-test
type: exitcode-stdio-1.0
default-language: Haskell2010
diff --git a/html-test/README.markdown b/html-test/README.markdown
index 8d57acab..717bac5c 100644
--- a/html-test/README.markdown
+++ b/html-test/README.markdown
@@ -1,7 +1,7 @@
This is a testsuite for Haddock that uses the concept of "golden files". That
is, it compares output files against a set of reference files.
-To add a new test:
+To add a new test:
1. Create a module in the `html-test/src` directory.
diff --git a/html-test/ref/A.html b/html-test/ref/A.html
index 62f99ee0..56c04bc6 100644
--- a/html-test/ref/A.html
+++ b/html-test/ref/A.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -88,7 +88,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:A" class="def"
+ > <a href="" id="t:A" class="def"
>A</a
></p
><div class="subs constructors"
@@ -97,7 +97,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
><table
><tr
><td class="src"
- ><a name="v:A" class="def"
+ ><a href="" id="v:A" class="def"
>A</a
></td
><td class="doc empty"
@@ -108,7 +108,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:other" class="def"
+ ><a href="" id="v:other" class="def"
>other</a
> :: <a href=""
>Int</a
@@ -116,7 +116,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:test2" class="def"
+ ><a href="" id="v:test2" class="def"
>test2</a
> :: <a href=""
>Bool</a
@@ -130,7 +130,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:X" class="def"
+ > <a href="" id="t:X" class="def"
>X</a
></p
><div class="doc"
@@ -143,7 +143,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
><table
><tr
><td class="src"
- ><a name="v:X" class="def"
+ ><a href="" id="v:X" class="def"
>X</a
></td
><td class="doc"
@@ -156,7 +156,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:reExport" class="def"
+ ><a href="" id="v:reExport" class="def"
>reExport</a
> :: <a href=""
>Int</a
@@ -172,7 +172,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_A.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/AdvanceTypes.html b/html-test/ref/AdvanceTypes.html
deleted file mode 100644
index b918a220..00000000
--- a/html-test/ref/AdvanceTypes.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
-><head
- ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
- /><title
- >AdvanceTypes</title
- ><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
- /><script src="haddock-util.js" type="text/javascript"
- ></script
- ><script type="text/javascript"
- >//<![CDATA[
-window.onload = function () {pageLoad();setSynopsis("mini_AdvanceTypes.html");};
-//]]>
-</script
- ></head
- ><body
- ><div id="package-header"
- ><ul class="links" id="page-menu"
- ><li
- ><a href=""
- >Contents</a
- ></li
- ><li
- ><a href=""
- >Index</a
- ></li
- ></ul
- ><p class="caption empty"
- >&nbsp;</p
- ></div
- ><div id="content"
- ><div id="module-header"
- ><table class="info"
- ><tr
- ><th
- >Safe Haskell</th
- ><td
- >Safe-Inferred</td
- ></tr
- ></table
- ><p class="caption"
- >AdvanceTypes</p
- ></div
- ><div id="interface"
- ><h1
- >Documentation</h1
- ><div class="top"
- ><p class="src"
- ><span class="keyword"
- >data</span
- > <a name="t:Pattern" class="def"
- >Pattern</a
- > :: [*] -&gt; * <span class="keyword"
- >where</span
- ></p
- ><div class="subs constructors"
- ><p class="caption"
- >Constructors</p
- ><table
- ><tr
- ><td class="src"
- ><a name="v:Nil" class="def"
- >Nil</a
- > :: <a href=""
- >Pattern</a
- > []</td
- ><td class="doc empty"
- >&nbsp;</td
- ></tr
- ><tr
- ><td class="src"
- ><a name="v:Cons" class="def"
- >Cons</a
- > :: <a href=""
- >Maybe</a
- > h -&gt; <a href=""
- >Pattern</a
- > t -&gt; <a href=""
- >Pattern</a
- > (h : t)</td
- ><td class="doc empty"
- >&nbsp;</td
- ></tr
- ></table
- ></div
- ></div
- ></div
- ></div
- ><div id="footer"
- ><p
- >Produced by <a href=""
- >Haddock</a
- > version 2.15.0</p
- ></div
- ></body
- ></html
->
diff --git a/html-test/ref/B.html b/html-test/ref/B.html
index 87a3a963..6176cbeb 100644
--- a/html-test/ref/B.html
+++ b/html-test/ref/B.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_B.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -82,7 +82,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_B.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:test" class="def"
+ ><a href="" id="v:test" class="def"
>test</a
> :: <a href=""
>Int</a
@@ -120,7 +120,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_B.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:reExport" class="def"
+ ><a href="" id="v:reExport" class="def"
>reExport</a
> :: <a href=""
>Int</a
@@ -134,7 +134,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_B.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:X" class="def"
+ > <a href="" id="t:X" class="def"
>X</a
></p
><div class="doc"
@@ -147,7 +147,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_B.html");};
><table
><tr
><td class="src"
- ><a name="v:X" class="def"
+ ><a href="" id="v:X" class="def"
>X</a
></td
><td class="doc"
@@ -164,7 +164,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_B.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bold.html b/html-test/ref/Bold.html
index 7151862d..904d2239 100644
--- a/html-test/ref/Bold.html
+++ b/html-test/ref/Bold.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bold.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bold.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: t</p
><div class="doc"
@@ -92,7 +92,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bold.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug1.html b/html-test/ref/Bug1.html
index 0bc166e3..28de3c64 100644
--- a/html-test/ref/Bug1.html
+++ b/html-test/ref/Bug1.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -62,7 +62,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T" class="def"
+ > <a href="" id="t:T" class="def"
>T</a
></p
><div class="doc"
@@ -80,7 +80,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");};
><table
><tr
><td class="src"
- ><a name="v:T" class="def"
+ ><a href="" id="v:T" class="def"
>T</a
></td
><td class="doc empty"
@@ -95,7 +95,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug1.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug195.html b/html-test/ref/Bug195.html
index c647c02d..39816f32 100644
--- a/html-test/ref/Bug195.html
+++ b/html-test/ref/Bug195.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T" class="def"
+ > <a href="" id="t:T" class="def"
>T</a
></p
><div class="subs constructors"
@@ -57,7 +57,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><table
><tr
><td class="src"
- ><a name="v:A" class="def"
+ ><a href="" id="v:A" class="def"
>A</a
></td
><td class="doc empty"
@@ -68,32 +68,34 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:someField" class="def"
- >someField</a
- > :: ()</dt
- ><dd class="doc"
- ><p
- >Doc for someField of A</p
- ></dd
- ><dt class="src"
- ><a name="v:someOtherField" class="def"
- >someOtherField</a
- > :: ()</dt
- ><dd class="doc"
- ><p
- >Doc for someOtherField of A</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:someField" class="def"
+ >someField</a
+ > :: ()</dfn
+ ><div class="doc"
+ ><p
+ >Doc for someField of A</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:someOtherField" class="def"
+ >someOtherField</a
+ > :: ()</dfn
+ ><div class="doc"
+ ><p
+ >Doc for someOtherField of A</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
><tr
><td class="src"
- ><a name="v:B" class="def"
+ ><a href="" id="v:B" class="def"
>B</a
></td
><td class="doc empty"
@@ -104,32 +106,34 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:someField" class="def"
- >someField</a
- > :: ()</dt
- ><dd class="doc"
- ><p
- >Doc for someField of A</p
- ></dd
- ><dt class="src"
- ><a name="v:someOtherField" class="def"
- >someOtherField</a
- > :: ()</dt
- ><dd class="doc"
- ><p
- >Doc for someOtherField of A</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:someField" class="def"
+ >someField</a
+ > :: ()</dfn
+ ><div class="doc"
+ ><p
+ >Doc for someField of A</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:someOtherField" class="def"
+ >someOtherField</a
+ > :: ()</dfn
+ ><div class="doc"
+ ><p
+ >Doc for someOtherField of A</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
><tr
><td class="src"
- ><a name="v:C" class="def"
+ ><a href="" id="v:C" class="def"
>C</a
></td
><td class="doc empty"
@@ -140,26 +144,28 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:someField" class="def"
- >someField</a
- > :: ()</dt
- ><dd class="doc"
- ><p
- >Doc for someField of A</p
- ></dd
- ><dt class="src"
- ><a name="v:someOtherField" class="def"
- >someOtherField</a
- > :: ()</dt
- ><dd class="doc"
- ><p
- >Doc for someOtherField of A</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:someField" class="def"
+ >someField</a
+ > :: ()</dfn
+ ><div class="doc"
+ ><p
+ >Doc for someField of A</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:someOtherField" class="def"
+ >someOtherField</a
+ > :: ()</dfn
+ ><div class="doc"
+ ><p
+ >Doc for someOtherField of A</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
@@ -172,7 +178,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug195.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug2.html b/html-test/ref/Bug2.html
index 356f99d3..c28fb609 100644
--- a/html-test/ref/Bug2.html
+++ b/html-test/ref/Bug2.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug2.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -46,7 +46,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug2.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:x" class="def"
+ ><a href="" id="v:x" class="def"
>x</a
> :: <a href=""
>A</a
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug2.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug201.html b/html-test/ref/Bug201.html
index 893ccbef..58bed8e8 100644
--- a/html-test/ref/Bug201.html
+++ b/html-test/ref/Bug201.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug201.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -60,7 +60,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug201.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: ()</p
><div class="doc"
@@ -72,7 +72,7 @@ should be dropped
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: ()</p
><div class="doc"
@@ -95,7 +95,7 @@ because there's a space before closing @
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug253.html b/html-test/ref/Bug253.html
new file mode 100644
index 00000000..d8e49bd4
--- /dev/null
+++ b/html-test/ref/Bug253.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+ /><title
+ >Bug253</title
+ ><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
+ /><script src="haddock-util.js" type="text/javascript"
+ ></script
+ ><script type="text/javascript"
+ >//<![CDATA[
+window.onload = function () {pageLoad();setSynopsis("mini_Bug253.html");};
+//]]>
+</script
+ ></head
+ ><body
+ ><div id="package-header"
+ ><ul class="links" id="page-menu"
+ ><li
+ ><a href="index.html"
+ >Contents</a
+ ></li
+ ><li
+ ><a href="doc-index.html"
+ >Index</a
+ ></li
+ ></ul
+ ><p class="caption empty"
+ >&nbsp;</p
+ ></div
+ ><div id="content"
+ ><div id="module-header"
+ ><table class="info"
+ ><tr
+ ><th
+ >Safe Haskell</th
+ ><td
+ >Safe</td
+ ></tr
+ ></table
+ ><p class="caption"
+ >Bug253</p
+ ></div
+ ><div id="description"
+ ><p class="caption"
+ >Description</p
+ ><div class="doc"
+ ><p
+ >This module tests that if we're trying to link to a <em
+ >qualified</em
+ >
+ identifier that's not in scope, we get an anchor as if it was a
+ variable. Previous behaviour was to treat it as a type constructor
+ so issue like #253 arose. Also see <code
+ >rename</code
+ > function comments in
+ source.</p
+ ></div
+ ></div
+ ><div id="synopsis"
+ ><p id="control.syn" class="caption expander" onclick="toggleSection('syn')"
+ >Synopsis</p
+ ><ul id="section.syn" class="hide" onclick="toggleSection('syn')"
+ ><li class="src short"
+ ><a href="#v:foo"
+ >foo</a
+ > :: ()</li
+ ></ul
+ ></div
+ ><div id="interface"
+ ><h1
+ >Documentation</h1
+ ><div class="top"
+ ><p class="src"
+ ><a href="#v:foo" id="v:foo" class="def"
+ >foo</a
+ > :: ()</p
+ ><div class="doc"
+ ><p
+ >This link should generate <code
+ >#v</code
+ > anchor: <code
+ ><a href="DoesNotExist.html#v:fakeFakeFake"
+ >fakeFakeFake</a
+ ></code
+ ></p
+ ></div
+ ></div
+ ></div
+ ></div
+ ><div id="footer"
+ ><p
+ >Produced by <a href="http://www.haskell.org/haddock/"
+ >Haddock</a
+ > version 2.16.2</p
+ ></div
+ ></body
+ ></html
+>
diff --git a/html-test/ref/Bug26.html b/html-test/ref/Bug26.html
index 117286ce..bdb51231 100644
--- a/html-test/ref/Bug26.html
+++ b/html-test/ref/Bug26.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -86,7 +86,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: ()</p
><div class="doc"
@@ -100,7 +100,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: ()</p
><div class="doc"
@@ -112,7 +112,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:C" class="def"
+ > <a href="" id="t:C" class="def"
>C</a
> a <span class="keyword"
>where</span
@@ -129,7 +129,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:c_f" class="def"
+ ><a href="" id="v:c_f" class="def"
>c_f</a
> :: a</p
><div class="doc"
@@ -145,10 +145,14 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
><div id="section.i:C" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >C</a
- > ()</td
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:C:C:1" class="instance expander" onclick="toggleSection('i:ic:C:C:1')"
+ ></span
+ > <a href=""
+ >C</a
+ > ()</span
+ ></td
><td class="doc"
><p
>instance for ()</p
@@ -158,6 +162,20 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
></p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:C:C:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >c_f</a
+ > :: ()</p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -168,7 +186,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug26.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.1</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug294.html b/html-test/ref/Bug294.html
index ceae2932..59171bd6 100644
--- a/html-test/ref/Bug294.html
+++ b/html-test/ref/Bug294.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:A" class="def"
+ > <a href="" id="t:A" class="def"
>A</a
></p
><div class="subs instances"
@@ -57,31 +57,35 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
><div id="section.i:A" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >DP</a
- > <a href=""
- >A</a
- > = <a name="v:ProblemCtor-39-" class="def"
- >ProblemCtor'</a
- > <a href=""
- >A</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >DP</a
+ > <a href=""
+ >A</a
+ > = <a href="" id="v:ProblemCtor-39-" class="def"
+ >ProblemCtor'</a
+ > <a href=""
+ >A</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > TP <a href=""
- >A</a
- > = <a name="v:ProblemCtor" class="def"
- >ProblemCtor</a
- > <a href=""
- >A</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > TP <a href=""
+ >A</a
+ > = <a href="" id="v:ProblemCtor" class="def"
+ >ProblemCtor</a
+ > <a href=""
+ >A</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
@@ -92,7 +96,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:problemField" class="def"
+ ><a href="" id="v:problemField" class="def"
>problemField</a
> :: TO <a href=""
>A</a
@@ -102,7 +106,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:problemField-39-" class="def"
+ ><a href="" id="v:problemField-39-" class="def"
>problemField'</a
> :: DO <a href=""
>A</a
@@ -112,7 +116,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:gadtField" class="def"
+ ><a href="" id="v:gadtField" class="def"
>gadtField</a
> :: GADT <a href=""
>A</a
@@ -124,7 +128,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
><p class="src"
><span class="keyword"
>data family</span
- > <a name="t:DP" class="def"
+ > <a href="" id="t:DP" class="def"
>DP</a
> t :: *</p
><div class="subs instances"
@@ -133,17 +137,19 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
><div id="section.i:DP" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >DP</a
- > <a href=""
- >A</a
- > = <a name="v:ProblemCtor-39-" class="def"
- >ProblemCtor'</a
- > <a href=""
- >A</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >DP</a
+ > <a href=""
+ >A</a
+ > = <a href="" id="v:ProblemCtor-39-" class="def"
+ >ProblemCtor'</a
+ > <a href=""
+ >A</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
@@ -158,7 +164,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug294.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug298.html b/html-test/ref/Bug298.html
index 040eccc4..9e52da5e 100644
--- a/html-test/ref/Bug298.html
+++ b/html-test/ref/Bug298.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug298.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -72,31 +72,31 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug298.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:-60--94--62-" class="def"
+ ><a href="" id="v:-60--94--62-" class="def"
>(&lt;^&gt;)</a
> :: (a -&gt; a) -&gt; a -&gt; a</p
></div
><div class="top"
><p class="src"
- ><a name="v:-60--94-" class="def"
+ ><a href="" id="v:-60--94-" class="def"
>(&lt;^)</a
> :: a -&gt; a -&gt; a</p
></div
><div class="top"
><p class="src"
- ><a name="v:-94--62-" class="def"
+ ><a href="" id="v:-94--62-" class="def"
>(^&gt;)</a
> :: a -&gt; a -&gt; a</p
></div
><div class="top"
><p class="src"
- ><a name="v:-8902--94-" class="def"
+ ><a href="" id="v:-8902--94-" class="def"
>(&#8902;^)</a
> :: a -&gt; a -&gt; a</p
></div
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: ()</p
><div class="doc"
@@ -126,7 +126,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug298.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug3.html b/html-test/ref/Bug3.html
index 7300abfe..70e799be 100644
--- a/html-test/ref/Bug3.html
+++ b/html-test/ref/Bug3.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug3.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug3.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -75,7 +75,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug3.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug308.html b/html-test/ref/Bug308.html
index 517a1cd9..23761bec 100644
--- a/html-test/ref/Bug308.html
+++ b/html-test/ref/Bug308.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -60,7 +60,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: ()</p
><div class="doc"
@@ -76,7 +76,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: ()</p
><div class="doc"
@@ -104,7 +104,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug308CrossModule.html b/html-test/ref/Bug308CrossModule.html
index 6a053d3c..fea4c4a5 100644
--- a/html-test/ref/Bug308CrossModule.html
+++ b/html-test/ref/Bug308CrossModule.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308CrossModule.html
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308CrossModule.html
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:h" class="def"
+ ><a href="" id="v:h" class="def"
>h</a
> :: ()</p
><div class="doc"
@@ -84,7 +84,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug308CrossModule.html
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug310.html b/html-test/ref/Bug310.html
index 926d6cf2..62717c76 100644
--- a/html-test/ref/Bug310.html
+++ b/html-test/ref/Bug310.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug310.html");};
><th
>Safe Haskell</th
><td
- >None</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -62,7 +62,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug310.html");};
><p class="src"
><span class="keyword"
>type family</span
- > a <a name="t:-43-" class="def"
+ > a <a href="" id="t:-43-" class="def"
>+</a
> b :: <a href=""
>Nat</a
@@ -82,7 +82,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug310.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.1</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug313.html b/html-test/ref/Bug313.html
index 5fa34eff..5477cf2c 100644
--- a/html-test/ref/Bug313.html
+++ b/html-test/ref/Bug313.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug313.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -73,7 +73,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug313.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:a" class="def"
+ ><a href="" id="v:a" class="def"
>a</a
> :: a</p
><div class="doc"
@@ -97,7 +97,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug313.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:b" class="def"
+ ><a href="" id="v:b" class="def"
>b</a
> :: a</p
><div class="doc"
@@ -125,7 +125,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug313.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug335.html b/html-test/ref/Bug335.html
index 76c39951..6b3dc613 100644
--- a/html-test/ref/Bug335.html
+++ b/html-test/ref/Bug335.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -60,13 +60,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: ()</p
><div class="doc"
- ><h3 id="control.ch:f0" class="caption collapser" onclick="toggleSection('ch:f0')"
+ ><h3 id="control.ch:f0" class="caption expander" onclick="toggleSection('ch:f0')"
>ExF:</h3
- ><div id="section.ch:f0" class="show"
+ ><div id="section.ch:f0" class="hide"
><p
>abc</p
></div
@@ -74,13 +74,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: ()</p
><div class="doc"
- ><h3 id="control.ch:g0" class="caption collapser" onclick="toggleSection('ch:g0')"
+ ><h3 id="control.ch:g0" class="caption expander" onclick="toggleSection('ch:g0')"
>ExG:</h3
- ><div id="section.ch:g0" class="show"
+ ><div id="section.ch:g0" class="hide"
><pre class="screen"
><code class="prompt"
>&gt;&gt;&gt; </code
@@ -118,7 +118,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug335.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.1</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Ticket253_2.html b/html-test/ref/Bug387.html
index 2e20f6ba..7b605fd0 100644
--- a/html-test/ref/Ticket253_2.html
+++ b/html-test/ref/Bug387.html
@@ -3,13 +3,13 @@
><head
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><title
- >Ticket253_2</title
+ >Bug387</title
><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
/><script src="haddock-util.js" type="text/javascript"
></script
><script type="text/javascript"
>//<![CDATA[
-window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_2.html");};
+window.onload = function () {pageLoad();setSynopsis("mini_Bug387.html");};
//]]>
</script
></head
@@ -35,11 +35,25 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_2.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
- >Ticket253_2</p
+ >Bug387</p
+ ></div
+ ><div id="table-of-contents"
+ ><p class="caption"
+ >Contents</p
+ ><ul
+ ><li
+ ><a href=""
+ >Section1</a
+ ></li
+ ><li
+ ><a href=""
+ >Section2</a
+ ></li
+ ></ul
></div
><div id="synopsis"
><p id="control.syn" class="caption expander" onclick="toggleSection('syn')"
@@ -47,56 +61,42 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_2.html");};
><ul id="section.syn" class="hide" onclick="toggleSection('syn')"
><li class="src short"
><a href=""
- >bar</a
+ >test1</a
> :: <a href=""
>Int</a
></li
><li class="src short"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Baz</a
- > = <a href=""
- >Baz</a
+ ><a href=""
+ >test2</a
+ > :: <a href=""
+ >Int</a
></li
></ul
></div
><div id="interface"
- ><h1
- >Documentation</h1
+ ><h1 id="g:1"
+ >Section1<a name="a:section1"
+ ></a
+ ></h1
><div class="top"
><p class="src"
- ><a name="v:bar" class="def"
- >bar</a
+ ><a href="" id="v:test1" class="def"
+ >test1</a
> :: <a href=""
>Int</a
></p
- ><div class="doc"
- ><p
- >Comment</p
- ></div
></div
+ ><h1 id="g:2"
+ >Section2<a name="a:section2"
+ ></a
+ ></h1
><div class="top"
><p class="src"
- ><span class="keyword"
- >data</span
- > <a name="t:Baz" class="def"
- >Baz</a
+ ><a href="" id="v:test2" class="def"
+ >test2</a
+ > :: <a href=""
+ >Int</a
></p
- ><div class="subs constructors"
- ><p class="caption"
- >Constructors</p
- ><table
- ><tr
- ><td class="src"
- ><a name="v:Baz" class="def"
- >Baz</a
- ></td
- ><td class="doc empty"
- >&nbsp;</td
- ></tr
- ></table
- ></div
></div
></div
></div
@@ -104,7 +104,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_2.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug4.html b/html-test/ref/Bug4.html
index 5be058a5..f1fab937 100644
--- a/html-test/ref/Bug4.html
+++ b/html-test/ref/Bug4.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug4.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug4.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug4.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug6.html b/html-test/ref/Bug6.html
index b95b8be8..407a031c 100644
--- a/html-test/ref/Bug6.html
+++ b/html-test/ref/Bug6.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -132,7 +132,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:A" class="def"
+ > <a href="" id="t:A" class="def"
>A</a
></p
><div class="doc"
@@ -145,7 +145,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><table
><tr
><td class="src"
- ><a name="v:A" class="def"
+ ><a href="" id="v:A" class="def"
>A</a
> <a href=""
>Int</a
@@ -160,7 +160,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:B" class="def"
+ > <a href="" id="t:B" class="def"
>B</a
></p
><div class="doc"
@@ -174,7 +174,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><table
><tr
><td class="src"
- ><a name="v:B" class="def"
+ ><a href="" id="v:B" class="def"
>B</a
></td
><td class="doc empty"
@@ -185,18 +185,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:b" class="def"
- >b</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:b" class="def"
+ >b</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -207,7 +207,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:C" class="def"
+ > <a href="" id="t:C" class="def"
>C</a
></p
><div class="doc"
@@ -220,7 +220,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><table
><tr
><td class="src"
- ><a name="v:C" class="def"
+ ><a href="" id="v:C" class="def"
>C</a
></td
><td class="doc empty"
@@ -231,26 +231,28 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:c1" class="def"
- >c1</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ><dt class="src"
- ><a name="v:c2" class="def"
- >c2</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:c1" class="def"
+ >c1</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:c2" class="def"
+ >c2</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -261,7 +263,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:D" class="def"
+ > <a href="" id="t:D" class="def"
>D</a
></p
><div class="doc"
@@ -275,7 +277,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><table
><tr
><td class="src"
- ><a name="v:D" class="def"
+ ><a href="" id="v:D" class="def"
>D</a
> <a href=""
>Int</a
@@ -292,7 +294,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:E" class="def"
+ > <a href="" id="t:E" class="def"
>E</a
></p
><div class="doc"
@@ -305,7 +307,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><table
><tr
><td class="src"
- ><a name="v:E" class="def"
+ ><a href="" id="v:E" class="def"
>E</a
> <a href=""
>Int</a
@@ -322,7 +324,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug6.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug7.html b/html-test/ref/Bug7.html
index 9afaa9a0..f3bd4db6 100644
--- a/html-test/ref/Bug7.html
+++ b/html-test/ref/Bug7.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -77,7 +77,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
></p
><div class="doc"
@@ -90,7 +90,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><table
><tr
><td class="src"
- ><a name="v:Foo" class="def"
+ ><a href="" id="v:Foo" class="def"
>Foo</a
></td
><td class="doc empty"
@@ -104,19 +104,29 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><div id="section.i:Foo" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Bar</a
- > <a href=""
- >Foo</a
- > <a href=""
- >Foo</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:Foo:Bar:1" class="instance expander" onclick="toggleSection('i:id:Foo:Bar:1')"
+ ></span
+ > <a href=""
+ >Bar</a
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >Foo</a
+ ></span
></td
><td class="doc"
><p
>Just one instance</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:id:Foo:Bar:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -125,7 +135,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Bar" class="def"
+ > <a href="" id="t:Bar" class="def"
>Bar</a
> x y</p
><div class="doc"
@@ -138,19 +148,29 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><div id="section.i:Bar" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Bar</a
- > <a href=""
- >Foo</a
- > <a href=""
- >Foo</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Bar:Bar:1" class="instance expander" onclick="toggleSection('i:ic:Bar:Bar:1')"
+ ></span
+ > <a href=""
+ >Bar</a
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >Foo</a
+ ></span
></td
><td class="doc"
><p
>Just one instance</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:Bar:Bar:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -161,7 +181,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug7.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug8.html b/html-test/ref/Bug8.html
index 288ee9f5..6f0bc654 100644
--- a/html-test/ref/Bug8.html
+++ b/html-test/ref/Bug8.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Typ" class="def"
+ > <a href="" id="t:Typ" class="def"
>Typ</a
></p
><div class="subs constructors"
@@ -57,7 +57,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
><table
><tr
><td class="src"
- ><a name="v:Type" class="def"
+ ><a href="" id="v:Type" class="def"
>Type</a
> (<a href=""
>Typ</a
@@ -69,7 +69,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
></tr
><tr
><td class="src"
- ><a name="v:TFree" class="def"
+ ><a href="" id="v:TFree" class="def"
>TFree</a
> (<a href=""
>Typ</a
@@ -84,7 +84,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:-45--45--62-" class="def"
+ ><a href="" id="v:-45--45--62-" class="def"
>(--&gt;)</a
> :: t -&gt; t1 -&gt; <a href=""
>Typ</a
@@ -96,9 +96,11 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:-45--45--45--62-" class="def"
+ ><a href="" id="v:-45--45--45--62-" class="def"
>(---&gt;)</a
- > :: [a] -&gt; <a href=""
+ > :: <a href=""
+ >Foldable</a
+ > t0 =&gt; t0 t -&gt; <a href=""
>Typ</a
> -&gt; <a href=""
>Typ</a
@@ -110,19 +112,19 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:s" class="def"
+ ><a href="" id="v:s" class="def"
>s</a
> :: t</p
></div
><div class="top"
><p class="src"
- ><a name="v:t" class="def"
+ ><a href="" id="v:t" class="def"
>t</a
> :: t</p
></div
><div class="top"
><p class="src"
- ><a name="v:main" class="def"
+ ><a href="" id="v:main" class="def"
>main</a
> :: t</p
></div
@@ -132,7 +134,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug8.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bug85.html b/html-test/ref/Bug85.html
index bb1f03a3..e1f0431f 100644
--- a/html-test/ref/Bug85.html
+++ b/html-test/ref/Bug85.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
> :: (* -&gt; *) -&gt; * -&gt; * <span class="keyword"
>where</span
@@ -59,7 +59,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><table
><tr
><td class="src"
- ><a name="v:Bar" class="def"
+ ><a href="" id="v:Bar" class="def"
>Bar</a
> :: f x -&gt; <a href=""
>Foo</a
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Baz" class="def"
+ > <a href="" id="t:Baz" class="def"
>Baz</a
> :: * <span class="keyword"
>where</span
@@ -85,7 +85,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><table
><tr
><td class="src"
- ><a name="v:Baz-39-" class="def"
+ ><a href="" id="v:Baz-39-" class="def"
>Baz'</a
> :: <a href=""
>Baz</a
@@ -100,7 +100,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Qux" class="def"
+ > <a href="" id="t:Qux" class="def"
>Qux</a
> <span class="keyword"
>where</span
@@ -111,7 +111,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><table
><tr
><td class="src"
- ><a name="v:Quux" class="def"
+ ><a href="" id="v:Quux" class="def"
>Quux</a
> :: <a href=""
>Qux</a
@@ -128,7 +128,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bug85.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/BugDeprecated.html b/html-test/ref/BugDeprecated.html
index 69521b95..28cf89be 100644
--- a/html-test/ref/BugDeprecated.html
+++ b/html-test/ref/BugDeprecated.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -88,7 +88,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -102,7 +102,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: <a href=""
>Int</a
@@ -116,7 +116,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:baz" class="def"
+ ><a href="" id="v:baz" class="def"
>baz</a
> :: <a href=""
>Int</a
@@ -130,7 +130,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:one" class="def"
+ ><a href="" id="v:one" class="def"
>one</a
> :: <a href=""
>Int</a
@@ -146,7 +146,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:two" class="def"
+ ><a href="" id="v:two" class="def"
>two</a
> :: <a href=""
>Int</a
@@ -160,7 +160,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:three" class="def"
+ ><a href="" id="v:three" class="def"
>three</a
> :: <a href=""
>Int</a
@@ -178,7 +178,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugDeprecated.html");}
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/BugExportHeadings.html b/html-test/ref/BugExportHeadings.html
index 89811402..d6ae0359 100644
--- a/html-test/ref/BugExportHeadings.html
+++ b/html-test/ref/BugExportHeadings.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -118,7 +118,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
>Foo</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -128,7 +128,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
>Bar</h1
><div class="top"
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: <a href=""
>Int</a
@@ -138,7 +138,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
>Baz</h1
><div class="top"
><p class="src"
- ><a name="v:baz" class="def"
+ ><a href="" id="v:baz" class="def"
>baz</a
> :: <a href=""
>Int</a
@@ -148,7 +148,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
>One</h1
><div class="top"
><p class="src"
- ><a name="v:one" class="def"
+ ><a href="" id="v:one" class="def"
>one</a
> :: <a href=""
>Int</a
@@ -164,7 +164,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
>Two</h1
><div class="top"
><p class="src"
- ><a name="v:two" class="def"
+ ><a href="" id="v:two" class="def"
>two</a
> :: <a href=""
>Int</a
@@ -180,7 +180,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
>Three</h1
><div class="top"
><p class="src"
- ><a name="v:three" class="def"
+ ><a href="" id="v:three" class="def"
>three</a
> :: <a href=""
>Int</a
@@ -198,7 +198,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_BugExportHeadings.html
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Bugs.html b/html-test/ref/Bugs.html
index 326d8bcd..78807f43 100644
--- a/html-test/ref/Bugs.html
+++ b/html-test/ref/Bugs.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bugs.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bugs.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:A" class="def"
+ > <a href="" id="t:A" class="def"
>A</a
> a</p
><div class="subs constructors"
@@ -57,7 +57,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bugs.html");};
><table
><tr
><td class="src"
- ><a name="v:A" class="def"
+ ><a href="" id="v:A" class="def"
>A</a
> a (a -&gt; <a href=""
>Int</a
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bugs.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/CrossPackageDocs.html b/html-test/ref/CrossPackageDocs.html
index 0a9a7ad6..39d216e0 100644
--- a/html-test/ref/CrossPackageDocs.html
+++ b/html-test/ref/CrossPackageDocs.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_CrossPackageDocs.html"
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
diff --git a/html-test/ref/DeprecatedClass.html b/html-test/ref/DeprecatedClass.html
index c8799bf2..7bf4b41c 100644
--- a/html-test/ref/DeprecatedClass.html
+++ b/html-test/ref/DeprecatedClass.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html")
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -82,7 +82,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html")
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:SomeClass" class="def"
+ > <a href="" id="t:SomeClass" class="def"
>SomeClass</a
> a <span class="keyword"
>where</span
@@ -99,7 +99,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html")
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: a -&gt; a</p
><div class="doc"
@@ -116,7 +116,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html")
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:SomeOtherClass" class="def"
+ > <a href="" id="t:SomeOtherClass" class="def"
>SomeOtherClass</a
> a <span class="keyword"
>where</span
@@ -131,7 +131,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html")
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: a -&gt; a</p
><div class="doc"
@@ -148,7 +148,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedClass.html")
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedData.html b/html-test/ref/DeprecatedData.html
index bccaeb26..0a90e110 100644
--- a/html-test/ref/DeprecatedData.html
+++ b/html-test/ref/DeprecatedData.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -86,7 +86,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
></p
><div class="doc"
@@ -103,7 +103,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
><table
><tr
><td class="src"
- ><a name="v:Foo" class="def"
+ ><a href="" id="v:Foo" class="def"
>Foo</a
></td
><td class="doc"
@@ -117,7 +117,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
></tr
><tr
><td class="src"
- ><a name="v:Bar" class="def"
+ ><a href="" id="v:Bar" class="def"
>Bar</a
></td
><td class="doc"
@@ -136,7 +136,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:One" class="def"
+ > <a href="" id="t:One" class="def"
>One</a
></p
><div class="doc"
@@ -151,7 +151,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
><table
><tr
><td class="src"
- ><a name="v:One" class="def"
+ ><a href="" id="v:One" class="def"
>One</a
></td
><td class="doc"
@@ -163,7 +163,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
></tr
><tr
><td class="src"
- ><a name="v:Two" class="def"
+ ><a href="" id="v:Two" class="def"
>Two</a
></td
><td class="doc"
@@ -182,7 +182,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedData.html");
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedFunction.html b/html-test/ref/DeprecatedFunction.html
index 53937867..b015bc95 100644
--- a/html-test/ref/DeprecatedFunction.html
+++ b/html-test/ref/DeprecatedFunction.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction.htm
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -64,7 +64,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction.htm
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -84,7 +84,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction.htm
></div
><div class="top"
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: <a href=""
>Int</a
@@ -100,7 +100,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction.htm
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedFunction2.html b/html-test/ref/DeprecatedFunction2.html
index 2ca11a32..46a509ee 100644
--- a/html-test/ref/DeprecatedFunction2.html
+++ b/html-test/ref/DeprecatedFunction2.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction2.ht
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction2.ht
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -76,7 +76,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction2.ht
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedFunction3.html b/html-test/ref/DeprecatedFunction3.html
index 7cbf5a42..1749d024 100644
--- a/html-test/ref/DeprecatedFunction3.html
+++ b/html-test/ref/DeprecatedFunction3.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction3.ht
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction3.ht
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Integer</a
@@ -76,7 +76,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedFunction3.ht
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedModule.html b/html-test/ref/DeprecatedModule.html
index 3864ce21..1dd3fb45 100644
--- a/html-test/ref/DeprecatedModule.html
+++ b/html-test/ref/DeprecatedModule.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedModule.html"
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -62,7 +62,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedModule.html"
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedModule.html"
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedModule2.html b/html-test/ref/DeprecatedModule2.html
index 104f4d97..dea6dc97 100644
--- a/html-test/ref/DeprecatedModule2.html
+++ b/html-test/ref/DeprecatedModule2.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedModule2.html
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedModule2.html
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -68,7 +68,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedModule2.html
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedNewtype.html b/html-test/ref/DeprecatedNewtype.html
index 143e60b7..c521ec33 100644
--- a/html-test/ref/DeprecatedNewtype.html
+++ b/html-test/ref/DeprecatedNewtype.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedNewtype.html
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedNewtype.html
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:SomeNewType" class="def"
+ > <a href="" id="t:SomeNewType" class="def"
>SomeNewType</a
></p
><div class="doc"
@@ -91,7 +91,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedNewtype.html
><table
><tr
><td class="src"
- ><a name="v:SomeNewTypeConst" class="def"
+ ><a href="" id="v:SomeNewTypeConst" class="def"
>SomeNewTypeConst</a
> <a href=""
>String</a
@@ -112,7 +112,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedNewtype.html
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:SomeOtherNewType" class="def"
+ > <a href="" id="t:SomeOtherNewType" class="def"
>SomeOtherNewType</a
></p
><div class="doc"
@@ -127,7 +127,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedNewtype.html
><table
><tr
><td class="src"
- ><a name="v:SomeOtherNewTypeConst" class="def"
+ ><a href="" id="v:SomeOtherNewTypeConst" class="def"
>SomeOtherNewTypeConst</a
> <a href=""
>String</a
@@ -148,7 +148,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedNewtype.html
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedReExport.html b/html-test/ref/DeprecatedReExport.html
index 5aa29f28..f73c2996 100644
--- a/html-test/ref/DeprecatedReExport.html
+++ b/html-test/ref/DeprecatedReExport.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedReExport.htm
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -84,7 +84,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedReExport.htm
>Re-exported from an other module</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -117,7 +117,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedReExport.htm
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedRecord.html b/html-test/ref/DeprecatedRecord.html
index 841dbf01..5991b7dc 100644
--- a/html-test/ref/DeprecatedRecord.html
+++ b/html-test/ref/DeprecatedRecord.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedRecord.html"
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -76,7 +76,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedRecord.html"
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
></p
><div class="doc"
@@ -89,7 +89,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedRecord.html"
><table
><tr
><td class="src"
- ><a name="v:Foo" class="def"
+ ><a href="" id="v:Foo" class="def"
>Foo</a
></td
><td class="doc empty"
@@ -100,34 +100,36 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedRecord.html"
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:fooName" class="def"
- >fooName</a
- > :: <a href=""
- >String</a
- ></dt
- ><dd class="doc"
- ><p
- >some name</p
- ></dd
- ><dt class="src"
- ><a name="v:fooValue" class="def"
- >fooValue</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><div class="warning"
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:fooName" class="def"
+ >fooName</a
+ > :: <a href=""
+ >String</a
+ ></dfn
+ ><div class="doc"
><p
- >Deprecated: do not use this</p
+ >some name</p
></div
- ><p
- >some value</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:fooValue" class="def"
+ >fooValue</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><div class="warning"
+ ><p
+ >Deprecated: do not use this</p
+ ></div
+ ><p
+ >some value</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
@@ -140,7 +142,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedRecord.html"
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedTypeFamily.html b/html-test/ref/DeprecatedTypeFamily.html
index c029ef21..175c1b25 100644
--- a/html-test/ref/DeprecatedTypeFamily.html
+++ b/html-test/ref/DeprecatedTypeFamily.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeFamily.h
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -66,7 +66,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeFamily.h
><p class="src"
><span class="keyword"
>data family</span
- > <a name="t:SomeTypeFamily" class="def"
+ > <a href="" id="t:SomeTypeFamily" class="def"
>SomeTypeFamily</a
> k :: * -&gt; *</p
><div class="doc"
@@ -82,7 +82,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeFamily.h
><p class="src"
><span class="keyword"
>data family</span
- > <a name="t:SomeOtherTypeFamily" class="def"
+ > <a href="" id="t:SomeOtherTypeFamily" class="def"
>SomeOtherTypeFamily</a
> k :: * -&gt; *</p
><div class="doc"
@@ -98,7 +98,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeFamily.h
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/DeprecatedTypeSynonym.html b/html-test/ref/DeprecatedTypeSynonym.html
index 346557c0..0f986624 100644
--- a/html-test/ref/DeprecatedTypeSynonym.html
+++ b/html-test/ref/DeprecatedTypeSynonym.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeSynonym.
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -70,7 +70,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeSynonym.
><p class="src"
><span class="keyword"
>type</span
- > <a name="t:TypeSyn" class="def"
+ > <a href="" id="t:TypeSyn" class="def"
>TypeSyn</a
> = <a href=""
>String</a
@@ -88,7 +88,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeSynonym.
><p class="src"
><span class="keyword"
>type</span
- > <a name="t:OtherTypeSyn" class="def"
+ > <a href="" id="t:OtherTypeSyn" class="def"
>OtherTypeSyn</a
> = <a href=""
>String</a
@@ -106,7 +106,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_DeprecatedTypeSynonym.
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Examples.html b/html-test/ref/Examples.html
index 1d06e32b..57c359df 100644
--- a/html-test/ref/Examples.html
+++ b/html-test/ref/Examples.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Examples.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -60,7 +60,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Examples.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:fib" class="def"
+ ><a href="" id="v:fib" class="def"
>fib</a
> :: <a href=""
>Integer</a
@@ -167,7 +167,7 @@ bar
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Extensions.html b/html-test/ref/Extensions.html
index b2acb26e..780466b8 100644
--- a/html-test/ref/Extensions.html
+++ b/html-test/ref/Extensions.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Extensions.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
><tr
><th
@@ -68,7 +68,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Extensions.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foobar" class="def"
+ ><a href="" id="v:foobar" class="def"
>foobar</a
> :: t</p
><div class="doc"
@@ -82,7 +82,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Extensions.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/FunArgs.html b/html-test/ref/FunArgs.html
index 5c1fe892..d889b611 100644
--- a/html-test/ref/FunArgs.html
+++ b/html-test/ref/FunArgs.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -46,7 +46,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
></p
><div class="subs arguments"
@@ -110,7 +110,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
></p
><div class="subs arguments"
@@ -154,7 +154,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:h" class="def"
+ ><a href="" id="v:h" class="def"
>h</a
></p
><div class="subs arguments"
@@ -198,7 +198,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:i" class="def"
+ ><a href="" id="v:i" class="def"
>i</a
></p
><div class="subs arguments"
@@ -238,7 +238,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:j" class="def"
+ ><a href="" id="v:j" class="def"
>j</a
></p
><div class="subs arguments"
@@ -274,7 +274,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_FunArgs.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/GADTRecords.html b/html-test/ref/GADTRecords.html
index 80e21e69..b5b60d0f 100644
--- a/html-test/ref/GADTRecords.html
+++ b/html-test/ref/GADTRecords.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -110,7 +110,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:H1" class="def"
+ > <a href="" id="t:H1" class="def"
>H1</a
> a b <span class="keyword"
>where</span
@@ -125,7 +125,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
><table
><tr
><td class="src"
- ><a name="v:C1" class="def"
+ ><a href="" id="v:C1" class="def"
>C1</a
> :: <a href=""
>H1</a
@@ -135,7 +135,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
></tr
><tr
><td class="src"
- ><a name="v:C2" class="def"
+ ><a href="" id="v:C2" class="def"
>C2</a
> :: <a href=""
>Ord</a
@@ -147,7 +147,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
></tr
><tr
><td class="src"
- ><a name="v:C3" class="def"
+ ><a href="" id="v:C3" class="def"
>C3</a
> :: <a href=""
>Int</a
@@ -166,26 +166,26 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:field" class="def"
- >field</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >hello docs</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:field" class="def"
+ >field</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><p
+ >hello docs</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
><tr
><td class="src"
- ><a name="v:C4" class="def"
+ ><a href="" id="v:C4" class="def"
>C4</a
> :: a -&gt; <a href=""
>H1</a
@@ -200,18 +200,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:field2" class="def"
- >field2</a
- > :: a</dt
- ><dd class="doc"
- ><p
- >hello2 docs</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:field2" class="def"
+ >field2</a
+ > :: a</dfn
+ ><div class="doc"
+ ><p
+ >hello2 docs</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
@@ -224,7 +224,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_GADTRecords.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Hash.html b/html-test/ref/Hash.html
index eff422f7..6e15a771 100644
--- a/html-test/ref/Hash.html
+++ b/html-test/ref/Hash.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -147,7 +147,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:HashTable" class="def"
+ > <a href="" id="t:HashTable" class="def"
>HashTable</a
> key val</p
><div class="doc"
@@ -172,7 +172,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
>s</h2
><div class="top"
><p class="src"
- ><a name="v:new" class="def"
+ ><a href="" id="v:new" class="def"
>new</a
> :: (<a href=""
>Eq</a
@@ -192,7 +192,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:insert" class="def"
+ ><a href="" id="v:insert" class="def"
>insert</a
> :: (<a href=""
>Eq</a
@@ -208,7 +208,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:lookup" class="def"
+ ><a href="" id="v:lookup" class="def"
>lookup</a
> :: <a href=""
>Hash</a
@@ -241,7 +241,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Hash" class="def"
+ > <a href="" id="t:Hash" class="def"
>Hash</a
> a <span class="keyword"
>where</span
@@ -254,7 +254,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:hash" class="def"
+ ><a href="" id="v:hash" class="def"
>hash</a
> :: a -&gt; <a href=""
>Int</a
@@ -276,37 +276,101 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
><div id="section.i:Hash" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Hash</a
- > <a href=""
- >Float</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Hash:Hash:1" class="instance expander" onclick="toggleSection('i:ic:Hash:Hash:1')"
+ ></span
+ > <a href=""
+ >Hash</a
+ > <a href=""
+ >Float</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><a href=""
- >Hash</a
- > <a href=""
- >Int</a
+ ><td colspan="2"
+ ><div id="section.i:ic:Hash:Hash:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >hash</a
+ > :: <a href=""
+ >Float</a
+ > -&gt; <a href=""
+ >Int</a
+ ></p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Hash:Hash:2" class="instance expander" onclick="toggleSection('i:ic:Hash:Hash:2')"
+ ></span
+ > <a href=""
+ >Hash</a
+ > <a href=""
+ >Int</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- >(<a href=""
- >Hash</a
- > a, <a href=""
- >Hash</a
- > b) =&gt; <a href=""
- >Hash</a
- > (a, b)</td
+ ><td colspan="2"
+ ><div id="section.i:ic:Hash:Hash:2" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >hash</a
+ > :: <a href=""
+ >Int</a
+ > -&gt; <a href=""
+ >Int</a
+ ></p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Hash:Hash:3" class="instance expander" onclick="toggleSection('i:ic:Hash:Hash:3')"
+ ></span
+ > (<a href=""
+ >Hash</a
+ > a, <a href=""
+ >Hash</a
+ > b) =&gt; <a href=""
+ >Hash</a
+ > (a, b)</span
+ ></td
><td class="doc empty"
>&nbsp;</td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:Hash:Hash:3" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >hash</a
+ > :: (a, b) -&gt; <a href=""
+ >Int</a
+ ></p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -317,7 +381,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hash.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/HiddenInstances.html b/html-test/ref/HiddenInstances.html
index 5a02bb84..3eb94df8 100644
--- a/html-test/ref/HiddenInstances.html
+++ b/html-test/ref/HiddenInstances.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -66,7 +66,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:VisibleClass" class="def"
+ > <a href="" id="t:VisibleClass" class="def"
>VisibleClass</a
> a</p
><div class="doc"
@@ -79,11 +79,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
><div id="section.i:VisibleClass" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >VisibleClass</a
- > <a href=""
- >Int</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:VisibleClass:VisibleClass:1" class="instance expander" onclick="toggleSection('i:ic:VisibleClass:VisibleClass:1')"
+ ></span
+ > <a href=""
+ >VisibleClass</a
+ > <a href=""
+ >Int</a
+ ></span
></td
><td class="doc"
><p
@@ -91,17 +95,33 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >VisibleClass</a
- > <a href=""
- >VisibleData</a
+ ><td colspan="2"
+ ><div id="section.i:ic:VisibleClass:VisibleClass:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:VisibleClass:VisibleClass:2" class="instance expander" onclick="toggleSection('i:ic:VisibleClass:VisibleClass:2')"
+ ></span
+ > <a href=""
+ >VisibleClass</a
+ > <a href=""
+ >VisibleData</a
+ ></span
></td
><td class="doc"
><p
>Should be visible</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:VisibleClass:VisibleClass:2" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -110,7 +130,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:VisibleData" class="def"
+ > <a href="" id="t:VisibleData" class="def"
>VisibleData</a
></p
><div class="doc"
@@ -123,11 +143,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
><div id="section.i:VisibleData" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Num</a
- > <a href=""
- >VisibleData</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:VisibleData:Num:1" class="instance expander" onclick="toggleSection('i:id:VisibleData:Num:1')"
+ ></span
+ > <a href=""
+ >Num</a
+ > <a href=""
+ >VisibleData</a
+ ></span
></td
><td class="doc"
><p
@@ -135,17 +159,99 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >VisibleClass</a
- > <a href=""
- >VisibleData</a
+ ><td colspan="2"
+ ><div id="section.i:id:VisibleData:Num:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >(+)</a
+ > :: <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >(-)</a
+ > :: <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >(*)</a
+ > :: <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >negate</a
+ > :: <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >abs</a
+ > :: <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >signum</a
+ > :: <a href=""
+ >VisibleData</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >fromInteger</a
+ > :: <a href=""
+ >Integer</a
+ > -&gt; <a href=""
+ >VisibleData</a
+ ></p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:VisibleData:VisibleClass:2" class="instance expander" onclick="toggleSection('i:id:VisibleData:VisibleClass:2')"
+ ></span
+ > <a href=""
+ >VisibleClass</a
+ > <a href=""
+ >VisibleData</a
+ ></span
></td
><td class="doc"
><p
>Should be visible</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:id:VisibleData:VisibleClass:2" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -156,7 +262,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstances.html")
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/HiddenInstancesB.html b/html-test/ref/HiddenInstancesB.html
index 8ecbfaae..8a1eb968 100644
--- a/html-test/ref/HiddenInstancesB.html
+++ b/html-test/ref/HiddenInstancesB.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstancesB.html"
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -66,7 +66,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstancesB.html"
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
> a</p
><div class="doc"
@@ -79,17 +79,27 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstancesB.html"
><div id="section.i:Foo" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Foo</a
- > <a href=""
- >Bar</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Foo:Foo:1" class="instance expander" onclick="toggleSection('i:ic:Foo:Foo:1')"
+ ></span
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >Bar</a
+ ></span
></td
><td class="doc"
><p
>Should be visible</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:Foo:Foo:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -98,7 +108,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstancesB.html"
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Bar" class="def"
+ > <a href="" id="t:Bar" class="def"
>Bar</a
></p
><div class="doc"
@@ -111,17 +121,27 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstancesB.html"
><div id="section.i:Bar" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Foo</a
- > <a href=""
- >Bar</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:Bar:Foo:1" class="instance expander" onclick="toggleSection('i:id:Bar:Foo:1')"
+ ></span
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >Bar</a
+ ></span
></td
><td class="doc"
><p
>Should be visible</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:id:Bar:Foo:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -132,7 +152,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_HiddenInstancesB.html"
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Hyperlinks.html b/html-test/ref/Hyperlinks.html
index 3454c488..b5547e50 100644
--- a/html-test/ref/Hyperlinks.html
+++ b/html-test/ref/Hyperlinks.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -80,7 +80,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Hyperlinks.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/IgnoreExports.html b/html-test/ref/IgnoreExports.html
index f64c4ece..6591f0d3 100644
--- a/html-test/ref/IgnoreExports.html
+++ b/html-test/ref/IgnoreExports.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_IgnoreExports.html");}
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -64,7 +64,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_IgnoreExports.html");}
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -76,7 +76,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_IgnoreExports.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: <a href=""
>Int</a
@@ -92,7 +92,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_IgnoreExports.html");}
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/ImplicitParams.html b/html-test/ref/ImplicitParams.html
index 3874af26..c81f484b 100644
--- a/html-test/ref/ImplicitParams.html
+++ b/html-test/ref/ImplicitParams.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:X" class="def"
+ > <a href="" id="t:X" class="def"
>X</a
></p
><div class="subs constructors"
@@ -57,7 +57,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
><table
><tr
><td class="src"
- ><a name="v:X" class="def"
+ ><a href="" id="v:X" class="def"
>X</a
></td
><td class="doc empty"
@@ -68,7 +68,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
></div
><div class="top"
><p class="src"
- ><a name="v:c" class="def"
+ ><a href="" id="v:c" class="def"
>c</a
> :: (?x :: <a href=""
>X</a
@@ -78,7 +78,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
></div
><div class="top"
><p class="src"
- ><a name="v:d" class="def"
+ ><a href="" id="v:d" class="def"
>d</a
> :: (?x :: <a href=""
>X</a
@@ -92,7 +92,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
></div
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: ((?x :: <a href=""
>X</a
@@ -104,7 +104,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ImplicitParams.html");
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Minimal.html b/html-test/ref/Minimal.html
index 32405540..48c469d1 100644
--- a/html-test/ref/Minimal.html
+++ b/html-test/ref/Minimal.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
> a <span class="keyword"
>where</span
@@ -85,7 +85,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: a</p
><div class="doc"
@@ -93,15 +93,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
>Any two of these are required...</p
></div
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: a</p
><p class="src"
- ><a name="v:bat" class="def"
+ ><a href="" id="v:bat" class="def"
>bat</a
> :: a</p
><p class="src"
- ><a name="v:fooBarBat" class="def"
+ ><a href="" id="v:fooBarBat" class="def"
>fooBarBat</a
> :: (a, a, a)</p
><div class="doc"
@@ -114,7 +114,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Weird" class="def"
+ > <a href="" id="t:Weird" class="def"
>Weird</a
> a <span class="keyword"
>where</span
@@ -143,31 +143,31 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:a" class="def"
+ ><a href="" id="v:a" class="def"
>a</a
> :: a</p
><p class="src"
- ><a name="v:b" class="def"
+ ><a href="" id="v:b" class="def"
>b</a
> :: a</p
><p class="src"
- ><a name="v:c" class="def"
+ ><a href="" id="v:c" class="def"
>c</a
> :: a</p
><p class="src"
- ><a name="v:d" class="def"
+ ><a href="" id="v:d" class="def"
>d</a
> :: a</p
><p class="src"
- ><a name="v:e" class="def"
+ ><a href="" id="v:e" class="def"
>e</a
> :: a</p
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: a</p
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: a</p
></div
@@ -176,7 +176,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:NoMins" class="def"
+ > <a href="" id="t:NoMins" class="def"
>NoMins</a
> a <span class="keyword"
>where</span
@@ -195,15 +195,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:x" class="def"
+ ><a href="" id="v:x" class="def"
>x</a
> :: a</p
><p class="src"
- ><a name="v:y" class="def"
+ ><a href="" id="v:y" class="def"
>y</a
> :: a</p
><p class="src"
- ><a name="v:z" class="def"
+ ><a href="" id="v:z" class="def"
>z</a
> :: a</p
></div
@@ -212,7 +212,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:FullMin" class="def"
+ > <a href="" id="t:FullMin" class="def"
>FullMin</a
> a <span class="keyword"
>where</span
@@ -221,11 +221,11 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:aaa" class="def"
+ ><a href="" id="v:aaa" class="def"
>aaa</a
> :: a</p
><p class="src"
- ><a name="v:bbb" class="def"
+ ><a href="" id="v:bbb" class="def"
>bbb</a
> :: a</p
></div
@@ -234,7 +234,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:PartialMin" class="def"
+ > <a href="" id="t:PartialMin" class="def"
>PartialMin</a
> a <span class="keyword"
>where</span
@@ -251,7 +251,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:ccc" class="def"
+ ><a href="" id="v:ccc" class="def"
>ccc</a
> :: a</p
></div
@@ -260,7 +260,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:EmptyMin" class="def"
+ > <a href="" id="t:EmptyMin" class="def"
>EmptyMin</a
> a <span class="keyword"
>where</span
@@ -275,11 +275,11 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:eee" class="def"
+ ><a href="" id="v:eee" class="def"
>eee</a
> :: a</p
><p class="src"
- ><a name="v:fff" class="def"
+ ><a href="" id="v:fff" class="def"
>fff</a
> :: a</p
></div
@@ -290,7 +290,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Minimal.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/ModuleWithWarning.html b/html-test/ref/ModuleWithWarning.html
index ca3942b6..fa2a6787 100644
--- a/html-test/ref/ModuleWithWarning.html
+++ b/html-test/ref/ModuleWithWarning.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ModuleWithWarning.html
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -62,7 +62,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ModuleWithWarning.html
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Int</a
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_ModuleWithWarning.html
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/NamedDoc.html b/html-test/ref/NamedDoc.html
index f28f5982..64e18711 100644
--- a/html-test/ref/NamedDoc.html
+++ b/html-test/ref/NamedDoc.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NamedDoc.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -60,7 +60,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NamedDoc.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Nesting.html b/html-test/ref/Nesting.html
index 2b0befba..7bba5148 100644
--- a/html-test/ref/Nesting.html
+++ b/html-test/ref/Nesting.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Nesting.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -73,6 +73,10 @@ window.onload = function () {pageLoad();setSynopsis("mini_Nesting.html");};
><a href=""
>j</a
> :: t</li
+ ><li class="src short"
+ ><a href=""
+ >k</a
+ > :: t</li
></ul
></div
><div id="interface"
@@ -80,7 +84,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Nesting.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:d" class="def"
+ ><a href="" id="v:d" class="def"
>d</a
> :: t</p
><div class="doc"
@@ -112,7 +116,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Nesting.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:e" class="def"
+ ><a href="" id="v:e" class="def"
>e</a
> :: t</p
><div class="doc"
@@ -133,7 +137,7 @@ the presence of this text pushes it out of nesting back to the top.</li
></div
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: t</p
><div class="doc"
@@ -151,7 +155,7 @@ the presence of this text pushes it out of nesting back to the top.</li
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: t</p
><div class="doc"
@@ -169,7 +173,7 @@ the presence of this text pushes it out of nesting back to the top.</li
></div
><div class="top"
><p class="src"
- ><a name="v:h" class="def"
+ ><a href="" id="v:h" class="def"
>h</a
> :: t</p
><div class="doc"
@@ -187,7 +191,7 @@ tracks</pre
></div
><div class="top"
><p class="src"
- ><a name="v:i" class="def"
+ ><a href="" id="v:i" class="def"
>i</a
> :: t</p
><div class="doc"
@@ -237,7 +241,7 @@ More of the indented list.</p
></div
><div class="top"
><p class="src"
- ><a name="v:j" class="def"
+ ><a href="" id="v:j" class="def"
>j</a
> :: t</p
><div class="doc"
@@ -285,16 +289,16 @@ with more of the indented list content.</p
><dd
>No newline separation even in indented lists.
We can have any paragraph level element that we normally
- can, like headers<h3
- >Level 3 header</h3
- ><p
- >with some content&#8230;</p
- ><ul
- ><li
- >and even more lists inside</li
- ></ul
- ></dd
+ can, like headers</dd
></dl
+ ><h3
+ >Level 3 header</h3
+ ><p
+ >with some content&#8230;</p
+ ><ul
+ ><li
+ >and even more lists inside</li
+ ></ul
></li
></ol
></li
@@ -303,13 +307,38 @@ with more of the indented list content.</p
></dl
></div
></div
+ ><div class="top"
+ ><p class="src"
+ ><a href="" id="v:k" class="def"
+ >k</a
+ > :: t</p
+ ><div class="doc"
+ ><ul
+ ><li
+ >list may start at arbitrary depth</li
+ ><li
+ >and consecutive items at that depth
+ belong to the same list</li
+ ><li
+ ><p
+ >of course we can still</p
+ ><ul
+ ><li
+ >nest items like we are used to</li
+ ></ul
+ ></li
+ ><li
+ >and then get back to initial list</li
+ ></ul
+ ></div
+ ></div
></div
></div
><div id="footer"
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/NoLayout.html b/html-test/ref/NoLayout.html
index a6bad724..8b47eab8 100644
--- a/html-test/ref/NoLayout.html
+++ b/html-test/ref/NoLayout.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NoLayout.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NoLayout.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: <a href=""
>Int</a
@@ -78,7 +78,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NoLayout.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/NonGreedy.html b/html-test/ref/NonGreedy.html
index 91deb281..c22c8ea9 100644
--- a/html-test/ref/NonGreedy.html
+++ b/html-test/ref/NonGreedy.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NonGreedy.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NonGreedy.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: a</p
><div class="doc"
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_NonGreedy.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Operators.html b/html-test/ref/Operators.html
index e9be655f..6ac8ae38 100644
--- a/html-test/ref/Operators.html
+++ b/html-test/ref/Operators.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -153,11 +153,11 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><a href=""
>(**&gt;)</a
>, <a href=""
- >(&lt;**)</a
+ >(**&lt;)</a
>, <a href=""
>(&gt;**)</a
>, <a href=""
- >(**&lt;)</a
+ >(&lt;**)</a
> :: a -&gt; a -&gt; ()</li
></ul
></li
@@ -176,7 +176,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:-43--45-" class="def"
+ ><a href="" id="v:-43--45-" class="def"
>(+-)</a
> :: a -&gt; a -&gt; a</p
><div class="doc"
@@ -186,7 +186,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:-42--47-" class="def"
+ ><a href="" id="v:-42--47-" class="def"
>(*/)</a
> :: a -&gt; a -&gt; a <span class="fixity"
>infixr 7</span
@@ -200,7 +200,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: a -&gt; a -&gt; a <span class="fixity"
>infixl 3</span
@@ -216,7 +216,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
></p
><div class="doc"
@@ -231,7 +231,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><td class="src"
><a href=""
>Foo</a
- > <a name="v:Bar" class="def"
+ > <a href="" id="v:Bar" class="def"
>`Bar`</a
> <a href=""
>Foo</a
@@ -249,7 +249,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><td class="src"
><a href=""
>Foo</a
- > <a name="v::-45-" class="def"
+ > <a href="" id="v::-45-" class="def"
>:-</a
> <a href=""
>Foo</a
@@ -270,7 +270,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>pattern</span
- > <a name="v::-43-" class="def"
+ > <a href="" id="v::-43-" class="def"
>(:+)</a
> :: t -&gt; t -&gt; [t] <span class="fixity"
>infixr 3</span
@@ -286,7 +286,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>data</span
- > a <a name="t:-60--45--62-" class="def"
+ > a <a href="" id="t:-60--45--62-" class="def"
>&lt;-&gt;</a
> b <span class="keyword"
>where</span
@@ -305,7 +305,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><table
><tr
><td class="src"
- ><a name="v::-60--45--62-" class="def"
+ ><a href="" id="v::-60--45--62-" class="def"
>(:&lt;-&gt;)</a
> :: a -&gt; b -&gt; a <a href=""
>&lt;-&gt;</a
@@ -324,7 +324,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>type family</span
- > a <a name="t:-43--43-" class="def"
+ > a <a href="" id="t:-43--43-" class="def"
>++</a
> b <span class="fixity"
>infix 3</span
@@ -340,7 +340,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>data family</span
- > a <a name="t:-42--42-" class="def"
+ > a <a href="" id="t:-42--42-" class="def"
>**</a
> b <span class="fixity"
>infix 9</span
@@ -356,7 +356,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>class</span
- > a <a name="t:-62--60--62-" class="def"
+ > a <a href="" id="t:-62--60--62-" class="def"
>&gt;&lt;&gt;</a
> b <span class="keyword"
>where</span
@@ -375,7 +375,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>type</span
- > a <a name="t:-60--62--60-" class="def"
+ > a <a href="" id="t:-60--62--60-" class="def"
>&lt;&gt;&lt;</a
> b :: * <span class="fixity"
>infixl 2</span
@@ -385,7 +385,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>data</span
- > a <a name="t:-62--60--60-" class="def"
+ > a <a href="" id="t:-62--60--60-" class="def"
>&gt;&lt;&lt;</a
> b <span class="fixity"
>infixl 3</span
@@ -397,9 +397,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:-62--62--60-" class="def"
+ ><a href="" id="v:-62--62--60-" class="def"
>(&gt;&gt;&lt;)</a
- >, <a name="v:-60--60--62-" class="def"
+ >, <a href="" id="v:-60--60--62-" class="def"
>(&lt;&lt;&gt;)</a
> :: a -&gt; b -&gt; () <span class="fixity"
>infixl 5 &lt;&lt;&gt;</span
@@ -409,18 +409,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
></span
></p
><p class="src"
- ><a name="v:-42--42--62-" class="def"
+ ><a href="" id="v:-42--42--62-" class="def"
>(**&gt;)</a
- >, <a name="v:-60--42--42-" class="def"
- >(&lt;**)</a
- >, <a name="v:-62--42--42-" class="def"
- >(&gt;**)</a
- >, <a name="v:-42--42--60-" class="def"
+ >, <a href="" id="v:-42--42--60-" class="def"
>(**&lt;)</a
+ >, <a href="" id="v:-62--42--42-" class="def"
+ >(&gt;**)</a
+ >, <a href="" id="v:-60--42--42-" class="def"
+ >(&lt;**)</a
> :: a -&gt; a -&gt; () <span class="fixity"
>infixr 8 **&gt;, &gt;**</span
><span class="fixity"
- >infixl 8 &lt;**, **&lt;</span
+ >infixl 8 **&lt;, &lt;**</span
><span class="rightedge"
></span
></p
@@ -434,7 +434,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p class="src"
><span class="keyword"
>type</span
- > <a name="t:-62--45--60-" class="def"
+ > <a href="" id="t:-62--45--60-" class="def"
>(&gt;-&lt;)</a
> a b = a <a href=""
>&lt;-&gt;</a
@@ -454,7 +454,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/PatternSyns.html b/html-test/ref/PatternSyns.html
index 00861b39..6fe8fff0 100644
--- a/html-test/ref/PatternSyns.html
+++ b/html-test/ref/PatternSyns.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -116,7 +116,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:FooType" class="def"
+ > <a href="" id="t:FooType" class="def"
>FooType</a
> x</p
><div class="doc"
@@ -129,7 +129,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><table
><tr
><td class="src"
- ><a name="v:FooCtor" class="def"
+ ><a href="" id="v:FooCtor" class="def"
>FooCtor</a
> x</td
><td class="doc empty"
@@ -142,7 +142,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p class="src"
><span class="keyword"
>pattern</span
- > <a name="v:Foo" class="def"
+ > <a href="" id="v:Foo" class="def"
>Foo</a
> :: t -&gt; <a href=""
>FooType</a
@@ -160,7 +160,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p class="src"
><span class="keyword"
>pattern</span
- > <a name="v:Bar" class="def"
+ > <a href="" id="v:Bar" class="def"
>Bar</a
> :: t -&gt; <a href=""
>FooType</a
@@ -180,7 +180,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p class="src"
><span class="keyword"
>pattern</span
- > <a name="v::-60--45--62-" class="def"
+ > <a href="" id="v::-60--45--62-" class="def"
>(:&lt;-&gt;)</a
> :: t -&gt; t -&gt; (<a href=""
>FooType</a
@@ -202,13 +202,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p class="src"
><span class="keyword"
>data</span
- > a <a name="t:-62--60-" class="def"
+ > a <a href="" id="t:-62--60-" class="def"
>&gt;&lt;</a
> b</p
><div class="doc"
><p
>Doc for (<code
- >&gt;&lt;</code
+ ><a href=""
+ >&gt;&lt;</a
+ ></code
>)</p
></div
><div class="subs constructors"
@@ -217,7 +219,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><table
><tr
><td class="src"
- ><a name="v:Empty" class="def"
+ ><a href="" id="v:Empty" class="def"
>Empty</a
></td
><td class="doc empty"
@@ -230,7 +232,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p class="src"
><span class="keyword"
>pattern</span
- > <a name="v:E" class="def"
+ > <a href="" id="v:E" class="def"
>E</a
> :: <a href=""
>(&gt;&lt;)</a
@@ -250,7 +252,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/PromotedTypes.html b/html-test/ref/PromotedTypes.html
new file mode 100644
index 00000000..db42f637
--- /dev/null
+++ b/html-test/ref/PromotedTypes.html
@@ -0,0 +1,201 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+ /><title
+ >PromotedTypes</title
+ ><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
+ /><script src="haddock-util.js" type="text/javascript"
+ ></script
+ ><script type="text/javascript"
+ >//<![CDATA[
+window.onload = function () {pageLoad();setSynopsis("mini_PromotedTypes.html");};
+//]]>
+</script
+ ></head
+ ><body
+ ><div id="package-header"
+ ><ul class="links" id="page-menu"
+ ><li
+ ><a href=""
+ >Contents</a
+ ></li
+ ><li
+ ><a href=""
+ >Index</a
+ ></li
+ ></ul
+ ><p class="caption empty"
+ >&nbsp;</p
+ ></div
+ ><div id="content"
+ ><div id="module-header"
+ ><table class="info"
+ ><tr
+ ><th
+ >Safe Haskell</th
+ ><td
+ >Safe</td
+ ></tr
+ ></table
+ ><p class="caption"
+ >PromotedTypes</p
+ ></div
+ ><div id="interface"
+ ><h1
+ >Documentation</h1
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href="" id="t:RevList" class="def"
+ >RevList</a
+ > a</p
+ ><div class="subs constructors"
+ ><p class="caption"
+ >Constructors</p
+ ><table
+ ><tr
+ ><td class="src"
+ ><a href="" id="v:RNil" class="def"
+ >RNil</a
+ ></td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ><tr
+ ><td class="src"
+ >(<a href=""
+ >RevList</a
+ > a) <a href="" id="v::-62-" class="def"
+ >:&gt;</a
+ > a</td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href="" id="t:Pattern" class="def"
+ >Pattern</a
+ > :: [*] -&gt; * <span class="keyword"
+ >where</span
+ ></p
+ ><div class="subs constructors"
+ ><p class="caption"
+ >Constructors</p
+ ><table
+ ><tr
+ ><td class="src"
+ ><a href="" id="v:Nil" class="def"
+ >Nil</a
+ > :: <a href=""
+ >Pattern</a
+ > '[]</td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ><tr
+ ><td class="src"
+ ><a href="" id="v:Cons" class="def"
+ >Cons</a
+ > :: <a href=""
+ >Maybe</a
+ > h -&gt; <a href=""
+ >Pattern</a
+ > t -&gt; <a href=""
+ >Pattern</a
+ > (h ': t)</td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href="" id="t:RevPattern" class="def"
+ >RevPattern</a
+ > :: <a href=""
+ >RevList</a
+ > * -&gt; * <span class="keyword"
+ >where</span
+ ></p
+ ><div class="subs constructors"
+ ><p class="caption"
+ >Constructors</p
+ ><table
+ ><tr
+ ><td class="src"
+ ><a href="" id="v:RevNil" class="def"
+ >RevNil</a
+ > :: <a href=""
+ >RevPattern</a
+ > <a href=""
+ >RNil</a
+ ></td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ><tr
+ ><td class="src"
+ ><a href="" id="v:RevCons" class="def"
+ >RevCons</a
+ > :: <a href=""
+ >Maybe</a
+ > h -&gt; <a href=""
+ >RevPattern</a
+ > t -&gt; <a href=""
+ >RevPattern</a
+ > (t <a href=""
+ >:&gt;</a
+ > h)</td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href="" id="t:Tuple" class="def"
+ >Tuple</a
+ > :: (*, *) -&gt; * <span class="keyword"
+ >where</span
+ ></p
+ ><div class="subs constructors"
+ ><p class="caption"
+ >Constructors</p
+ ><table
+ ><tr
+ ><td class="src"
+ ><a href="" id="v:Tuple" class="def"
+ >Tuple</a
+ > :: a -&gt; b -&gt; <a href=""
+ >Tuple</a
+ > '(a, b)</td
+ ><td class="doc empty"
+ >&nbsp;</td
+ ></tr
+ ></table
+ ></div
+ ></div
+ ></div
+ ></div
+ ><div id="footer"
+ ><p
+ >Produced by <a href=""
+ >Haddock</a
+ > version 2.16.2</p
+ ></div
+ ></body
+ ></html
+>
diff --git a/html-test/ref/Properties.html b/html-test/ref/Properties.html
index d491b98e..5d2e58c0 100644
--- a/html-test/ref/Properties.html
+++ b/html-test/ref/Properties.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Properties.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -60,7 +60,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Properties.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:fib" class="def"
+ ><a href="" id="v:fib" class="def"
>fib</a
> :: <a href=""
>Integer</a
@@ -84,7 +84,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Properties.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/PruneWithWarning.html b/html-test/ref/PruneWithWarning.html
index aa055203..bbf21f42 100644
--- a/html-test/ref/PruneWithWarning.html
+++ b/html-test/ref/PruneWithWarning.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PruneWithWarning.html"
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -63,7 +63,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_PruneWithWarning.html"
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/QuasiExpr.html b/html-test/ref/QuasiExpr.html
index 7c249819..41129d59 100644
--- a/html-test/ref/QuasiExpr.html
+++ b/html-test/ref/QuasiExpr.html
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Expr" class="def"
+ > <a href="" id="t:Expr" class="def"
>Expr</a
></p
><div class="subs constructors"
@@ -57,7 +57,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><table
><tr
><td class="src"
- ><a name="v:IntExpr" class="def"
+ ><a href="" id="v:IntExpr" class="def"
>IntExpr</a
> <a href=""
>Integer</a
@@ -67,7 +67,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></tr
><tr
><td class="src"
- ><a name="v:AntiIntExpr" class="def"
+ ><a href="" id="v:AntiIntExpr" class="def"
>AntiIntExpr</a
> <a href=""
>String</a
@@ -77,7 +77,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></tr
><tr
><td class="src"
- ><a name="v:BinopExpr" class="def"
+ ><a href="" id="v:BinopExpr" class="def"
>BinopExpr</a
> <a href=""
>BinOp</a
@@ -91,7 +91,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></tr
><tr
><td class="src"
- ><a name="v:AntiExpr" class="def"
+ ><a href="" id="v:AntiExpr" class="def"
>AntiExpr</a
> <a href=""
>String</a
@@ -107,15 +107,55 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><div id="section.i:Expr" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Show</a
- > <a href=""
- >Expr</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:Expr:Show:1" class="instance expander" onclick="toggleSection('i:id:Expr:Show:1')"
+ ></span
+ > <a href=""
+ >Show</a
+ > <a href=""
+ >Expr</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:id:Expr:Show:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >showsPrec</a
+ > :: <a href=""
+ >Int</a
+ > -&gt; <a href=""
+ >Expr</a
+ > -&gt; <a href=""
+ >ShowS</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >show</a
+ > :: <a href=""
+ >Expr</a
+ > -&gt; <a href=""
+ >String</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >showList</a
+ > :: [<a href=""
+ >Expr</a
+ >] -&gt; <a href=""
+ >ShowS</a
+ ></p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -124,7 +164,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:BinOp" class="def"
+ > <a href="" id="t:BinOp" class="def"
>BinOp</a
></p
><div class="subs constructors"
@@ -133,7 +173,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><table
><tr
><td class="src"
- ><a name="v:AddOp" class="def"
+ ><a href="" id="v:AddOp" class="def"
>AddOp</a
></td
><td class="doc empty"
@@ -141,7 +181,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></tr
><tr
><td class="src"
- ><a name="v:SubOp" class="def"
+ ><a href="" id="v:SubOp" class="def"
>SubOp</a
></td
><td class="doc empty"
@@ -149,7 +189,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></tr
><tr
><td class="src"
- ><a name="v:MulOp" class="def"
+ ><a href="" id="v:MulOp" class="def"
>MulOp</a
></td
><td class="doc empty"
@@ -157,7 +197,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></tr
><tr
><td class="src"
- ><a name="v:DivOp" class="def"
+ ><a href="" id="v:DivOp" class="def"
>DivOp</a
></td
><td class="doc empty"
@@ -171,22 +211,62 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><div id="section.i:BinOp" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Show</a
- > <a href=""
- >BinOp</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:BinOp:Show:1" class="instance expander" onclick="toggleSection('i:id:BinOp:Show:1')"
+ ></span
+ > <a href=""
+ >Show</a
+ > <a href=""
+ >BinOp</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:id:BinOp:Show:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >showsPrec</a
+ > :: <a href=""
+ >Int</a
+ > -&gt; <a href=""
+ >BinOp</a
+ > -&gt; <a href=""
+ >ShowS</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >show</a
+ > :: <a href=""
+ >BinOp</a
+ > -&gt; <a href=""
+ >String</a
+ ></p
+ ><p class="src"
+ ><a href=""
+ >showList</a
+ > :: [<a href=""
+ >BinOp</a
+ >] -&gt; <a href=""
+ >ShowS</a
+ ></p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
></div
><div class="top"
><p class="src"
- ><a name="v:eval" class="def"
+ ><a href="" id="v:eval" class="def"
>eval</a
> :: <a href=""
>Expr</a
@@ -196,13 +276,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:expr" class="def"
+ ><a href="" id="v:expr" class="def"
>expr</a
> :: QuasiQuoter</p
></div
><div class="top"
><p class="src"
- ><a name="v:parseExprExp" class="def"
+ ><a href="" id="v:parseExprExp" class="def"
>parseExprExp</a
> :: <a href=""
>String</a
@@ -214,7 +294,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiExpr.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/QuasiQuote.html b/html-test/ref/QuasiQuote.html
index f96a7e67..610f5edf 100644
--- a/html-test/ref/QuasiQuote.html
+++ b/html-test/ref/QuasiQuote.html
@@ -46,7 +46,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiQuote.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:val" class="def"
+ ><a href="" id="v:val" class="def"
>val</a
> :: <a href=""
>Integer</a
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_QuasiQuote.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/SpuriousSuperclassConstraints.html b/html-test/ref/SpuriousSuperclassConstraints.html
index 2394de94..1cae5ba1 100644
--- a/html-test/ref/SpuriousSuperclassConstraints.html
+++ b/html-test/ref/SpuriousSuperclassConstraints.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_SpuriousSuperclassCons
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -74,7 +74,7 @@ Fix spurious superclass constraints bug.</pre
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:SomeType" class="def"
+ > <a href="" id="t:SomeType" class="def"
>SomeType</a
> f a</p
><div class="subs instances"
@@ -83,27 +83,107 @@ Fix spurious superclass constraints bug.</pre
><div id="section.i:SomeType" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Functor</a
- > (<a href=""
- >SomeType</a
- > f)</td
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:SomeType:Functor:1" class="instance expander" onclick="toggleSection('i:id:SomeType:Functor:1')"
+ ></span
+ > <a href=""
+ >Functor</a
+ > (<a href=""
+ >SomeType</a
+ > f)</span
+ ></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><a href=""
- >Applicative</a
- > f =&gt; <a href=""
- >Applicative</a
- > (<a href=""
- >SomeType</a
- > f)</td
+ ><td colspan="2"
+ ><div id="section.i:id:SomeType:Functor:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >fmap</a
+ > :: (a -&gt; b) -&gt; <a href=""
+ >SomeType</a
+ > f a -&gt; <a href=""
+ >SomeType</a
+ > f b</p
+ ><p class="src"
+ ><a href=""
+ >(&lt;$)</a
+ > :: a -&gt; <a href=""
+ >SomeType</a
+ > f b -&gt; <a href=""
+ >SomeType</a
+ > f a</p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:SomeType:Applicative:2" class="instance expander" onclick="toggleSection('i:id:SomeType:Applicative:2')"
+ ></span
+ > <a href=""
+ >Applicative</a
+ > f =&gt; <a href=""
+ >Applicative</a
+ > (<a href=""
+ >SomeType</a
+ > f)</span
+ ></td
><td class="doc empty"
>&nbsp;</td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:id:SomeType:Applicative:2" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >pure</a
+ > :: a -&gt; <a href=""
+ >SomeType</a
+ > f a</p
+ ><p class="src"
+ ><a href=""
+ >(&lt;*&gt;)</a
+ > :: <a href=""
+ >SomeType</a
+ > f (a -&gt; b) -&gt; <a href=""
+ >SomeType</a
+ > f a -&gt; <a href=""
+ >SomeType</a
+ > f b</p
+ ><p class="src"
+ ><a href=""
+ >(*&gt;)</a
+ > :: <a href=""
+ >SomeType</a
+ > f a -&gt; <a href=""
+ >SomeType</a
+ > f b -&gt; <a href=""
+ >SomeType</a
+ > f b</p
+ ><p class="src"
+ ><a href=""
+ >(&lt;*)</a
+ > :: <a href=""
+ >SomeType</a
+ > f a -&gt; <a href=""
+ >SomeType</a
+ > f b -&gt; <a href=""
+ >SomeType</a
+ > f a</p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -114,7 +194,7 @@ Fix spurious superclass constraints bug.</pre
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/TH.html b/html-test/ref/TH.html
index 119d379c..e72c2189 100644
--- a/html-test/ref/TH.html
+++ b/html-test/ref/TH.html
@@ -46,7 +46,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TH.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:decl" class="def"
+ ><a href="" id="v:decl" class="def"
>decl</a
> :: Q [Dec]</p
></div
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TH.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/TH2.html b/html-test/ref/TH2.html
index 61145958..cf896bac 100644
--- a/html-test/ref/TH2.html
+++ b/html-test/ref/TH2.html
@@ -46,7 +46,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TH2.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: t -&gt; t</p
></div
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TH2.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Test.html b/html-test/ref/Test.html
index 89491f01..8b82fe0b 100644
--- a/html-test/ref/Test.html
+++ b/html-test/ref/Test.html
@@ -65,7 +65,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -371,11 +371,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><li
><a href=""
>r</a
- > :: <a href=""
- >Int</a
- ></li
- ><li
- ><a href=""
+ >, <a href=""
>s</a
> :: <a href=""
>Int</a
@@ -413,11 +409,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><li
><a href=""
>u</a
- > :: <a href=""
- >Int</a
- ></li
- ><li
- ><a href=""
+ >, <a href=""
>v</a
> :: <a href=""
>Int</a
@@ -669,7 +661,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T" class="def"
+ > <a href="" id="t:T" class="def"
>T</a
> a b</p
><div class="doc"
@@ -685,7 +677,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:A" class="def"
+ ><a href="" id="v:A" class="def"
>A</a
> <a href=""
>Int</a
@@ -705,7 +697,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
></tr
><tr
><td class="src"
- ><a name="v:B" class="def"
+ ><a href="" id="v:B" class="def"
>B</a
> (<a href=""
>T</a
@@ -732,7 +724,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T2" class="def"
+ > <a href="" id="t:T2" class="def"
>T2</a
> a b</p
><div class="doc"
@@ -744,7 +736,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T3" class="def"
+ > <a href="" id="t:T3" class="def"
>T3</a
> a b</p
><div class="doc"
@@ -757,7 +749,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:A1" class="def"
+ ><a href="" id="v:A1" class="def"
>A1</a
> a</td
><td class="doc empty"
@@ -765,7 +757,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
></tr
><tr
><td class="src"
- ><a name="v:B1" class="def"
+ ><a href="" id="v:B1" class="def"
>B1</a
> b</td
><td class="doc empty"
@@ -778,7 +770,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T4" class="def"
+ > <a href="" id="t:T4" class="def"
>T4</a
> a b</p
><div class="subs constructors"
@@ -787,7 +779,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:A2" class="def"
+ ><a href="" id="v:A2" class="def"
>A2</a
> a</td
><td class="doc empty"
@@ -795,7 +787,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
></tr
><tr
><td class="src"
- ><a name="v:B2" class="def"
+ ><a href="" id="v:B2" class="def"
>B2</a
> b</td
><td class="doc empty"
@@ -808,7 +800,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T5" class="def"
+ > <a href="" id="t:T5" class="def"
>T5</a
> a b</p
><div class="subs constructors"
@@ -817,7 +809,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:A3" class="def"
+ ><a href="" id="v:A3" class="def"
>A3</a
> a</td
><td class="doc"
@@ -831,7 +823,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
></tr
><tr
><td class="src"
- ><a name="v:B3" class="def"
+ ><a href="" id="v:B3" class="def"
>B3</a
> b</td
><td class="doc"
@@ -850,7 +842,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:T6" class="def"
+ > <a href="" id="t:T6" class="def"
>T6</a
></p
><div class="doc"
@@ -863,7 +855,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:A4" class="def"
+ ><a href="" id="v:A4" class="def"
>A4</a
></td
><td class="doc"
@@ -877,7 +869,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
></tr
><tr
><td class="src"
- ><a name="v:B4" class="def"
+ ><a href="" id="v:B4" class="def"
>B4</a
></td
><td class="doc"
@@ -891,7 +883,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
></tr
><tr
><td class="src"
- ><a name="v:C4" class="def"
+ ><a href="" id="v:C4" class="def"
>C4</a
></td
><td class="doc"
@@ -910,7 +902,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:N1" class="def"
+ > <a href="" id="t:N1" class="def"
>N1</a
> a</p
><div class="doc"
@@ -923,7 +915,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:N1" class="def"
+ ><a href="" id="v:N1" class="def"
>N1</a
> a</td
><td class="doc empty"
@@ -936,7 +928,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:N2" class="def"
+ > <a href="" id="t:N2" class="def"
>N2</a
> a b</p
><div class="doc"
@@ -949,7 +941,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:N2" class="def"
+ ><a href="" id="v:N2" class="def"
>N2</a
></td
><td class="doc empty"
@@ -960,16 +952,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:n" class="def"
- >n</a
- > :: a b</dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:n" class="def"
+ >n</a
+ > :: a b</dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -980,7 +972,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:N3" class="def"
+ > <a href="" id="t:N3" class="def"
>N3</a
> a b</p
><div class="doc"
@@ -993,7 +985,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:N3" class="def"
+ ><a href="" id="v:N3" class="def"
>N3</a
></td
><td class="doc empty"
@@ -1004,22 +996,22 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:n3" class="def"
- >n3</a
- > :: a b</dt
- ><dd class="doc"
- ><p
- >this is the <code
- ><a href=""
- >n3</a
- ></code
- > field</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:n3" class="def"
+ >n3</a
+ > :: a b</dfn
+ ><div class="doc"
+ ><p
+ >this is the <code
+ ><a href=""
+ >n3</a
+ ></code
+ > field</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
@@ -1030,7 +1022,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:N4" class="def"
+ > <a href="" id="t:N4" class="def"
>N4</a
> a b</p
><div class="doc"
@@ -1043,7 +1035,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:N5" class="def"
+ > <a href="" id="t:N5" class="def"
>N5</a
> a b</p
><div class="subs constructors"
@@ -1052,7 +1044,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:N5" class="def"
+ ><a href="" id="v:N5" class="def"
>N5</a
></td
><td class="doc empty"
@@ -1063,18 +1055,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:n5" class="def"
- >n5</a
- > :: a b</dt
- ><dd class="doc"
- ><p
- >no docs on the datatype or the constructor</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:n5" class="def"
+ >n5</a
+ > :: a b</dfn
+ ><div class="doc"
+ ><p
+ >no docs on the datatype or the constructor</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
@@ -1085,7 +1077,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:N6" class="def"
+ > <a href="" id="t:N6" class="def"
>N6</a
> a b</p
><div class="subs constructors"
@@ -1094,7 +1086,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:N6" class="def"
+ ><a href="" id="v:N6" class="def"
>N6</a
></td
><td class="doc"
@@ -1107,16 +1099,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:n6" class="def"
- >n6</a
- > :: a b</dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:n6" class="def"
+ >n6</a
+ > :: a b</dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -1127,7 +1119,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:N7" class="def"
+ > <a href="" id="t:N7" class="def"
>N7</a
> a b</p
><div class="doc"
@@ -1140,7 +1132,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:N7" class="def"
+ ><a href="" id="v:N7" class="def"
>N7</a
></td
><td class="doc"
@@ -1157,16 +1149,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:n7" class="def"
- >n7</a
- > :: a b</dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:n7" class="def"
+ >n7</a
+ > :: a b</dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -1179,7 +1171,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:R" class="def"
+ > <a href="" id="t:R" class="def"
>R</a
></p
><div class="doc"
@@ -1213,7 +1205,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:C1" class="def"
+ ><a href="" id="v:C1" class="def"
>C1</a
></td
><td class="doc"
@@ -1230,80 +1222,68 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:p" class="def"
- >p</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >This comment applies to the <code
- ><a href=""
- >p</a
- ></code
- > field</p
- ></dd
- ><dt class="src"
- ><a name="v:q" class="def"
- >q</a
- > :: <span class="keyword"
- >forall</span
- > a. a -&gt; a</dt
- ><dd class="doc"
- ><p
- >This comment applies to the <code
- ><a href=""
- >q</a
- ></code
- > field</p
- ></dd
- ><dt class="src"
- ><a name="v:r" class="def"
- >r</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >This comment applies to both <code
- ><a href=""
- >r</a
- ></code
- > and <code
- ><a href=""
- >s</a
- ></code
- ></p
- ></dd
- ><dt class="src"
- ><a name="v:s" class="def"
- >s</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >This comment applies to both <code
- ><a href=""
- >r</a
- ></code
- > and <code
- ><a href=""
- >s</a
- ></code
- ></p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:p" class="def"
+ >p</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><p
+ >This comment applies to the <code
+ ><a href=""
+ >p</a
+ ></code
+ > field</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:q" class="def"
+ >q</a
+ > :: <span class="keyword"
+ >forall</span
+ > a. a -&gt; a</dfn
+ ><div class="doc"
+ ><p
+ >This comment applies to the <code
+ ><a href=""
+ >q</a
+ ></code
+ > field</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:r" class="def"
+ >r</a
+ >, <a href="" id="v:s" class="def"
+ >s</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><p
+ >This comment applies to both <code
+ ><a href=""
+ >r</a
+ ></code
+ > and <code
+ ><a href=""
+ >s</a
+ ></code
+ ></p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
><tr
><td class="src"
- ><a name="v:C2" class="def"
+ ><a href="" id="v:C2" class="def"
>C2</a
></td
><td class="doc"
@@ -1320,52 +1300,48 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:t" class="def"
- >t</a
- > :: T1 -&gt; <a href=""
- >T2</a
- > <a href=""
- >Int</a
- > <a href=""
- >Int</a
- > -&gt; <a href=""
- >T3</a
- > <a href=""
- >Bool</a
- > <a href=""
- >Bool</a
- > -&gt; <a href=""
- >T4</a
- > <a href=""
- >Float</a
- > <a href=""
- >Float</a
- > -&gt; <a href=""
- >T5</a
- > () ()</dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ><dt class="src"
- ><a name="v:u" class="def"
- >u</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ><dt class="src"
- ><a name="v:v" class="def"
- >v</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:t" class="def"
+ >t</a
+ > :: T1 -&gt; <a href=""
+ >T2</a
+ > <a href=""
+ >Int</a
+ > <a href=""
+ >Int</a
+ > -&gt; <a href=""
+ >T3</a
+ > <a href=""
+ >Bool</a
+ > <a href=""
+ >Bool</a
+ > -&gt; <a href=""
+ >T4</a
+ > <a href=""
+ >Float</a
+ > <a href=""
+ >Float</a
+ > -&gt; <a href=""
+ >T5</a
+ > () ()</dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:u" class="def"
+ >u</a
+ >, <a href="" id="v:v" class="def"
+ >v</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -1376,7 +1352,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:R1" class="def"
+ > <a href="" id="t:R1" class="def"
>R1</a
></p
><div class="doc"
@@ -1389,7 +1365,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><table
><tr
><td class="src"
- ><a name="v:C3" class="def"
+ ><a href="" id="v:C3" class="def"
>C3</a
></td
><td class="doc"
@@ -1406,52 +1382,56 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:s1" class="def"
- >s1</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >The <code
- ><a href=""
- >s1</a
- ></code
- > record selector</p
- ></dd
- ><dt class="src"
- ><a name="v:s2" class="def"
- >s2</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >The <code
- ><a href=""
- >s2</a
- ></code
- > record selector</p
- ></dd
- ><dt class="src"
- ><a name="v:s3" class="def"
- >s3</a
- > :: <a href=""
- >Int</a
- ></dt
- ><dd class="doc"
- ><p
- >The <code
- ><a href=""
- >s3</a
- ></code
- > record selector</p
- ></dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:s1" class="def"
+ >s1</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><p
+ >The <code
+ ><a href=""
+ >s1</a
+ ></code
+ > record selector</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:s2" class="def"
+ >s2</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><p
+ >The <code
+ ><a href=""
+ >s2</a
+ ></code
+ > record selector</p
+ ></div
+ ></li
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:s3" class="def"
+ >s3</a
+ > :: <a href=""
+ >Int</a
+ ></dfn
+ ><div class="doc"
+ ><p
+ >The <code
+ ><a href=""
+ >s3</a
+ ></code
+ > record selector</p
+ ></div
+ ></li
+ ></ul
></div
></td
></tr
@@ -1470,7 +1450,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
>class</span
> <a href=""
>D</a
- > a =&gt; <a name="t:C" class="def"
+ > a =&gt; <a href="" id="t:C" class="def"
>C</a
> a <span class="keyword"
>where</span
@@ -1489,7 +1469,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:a" class="def"
+ ><a href="" id="v:a" class="def"
>a</a
> :: <a href=""
>IO</a
@@ -1503,7 +1483,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
> method</p
></div
><p class="src"
- ><a name="v:b" class="def"
+ ><a href="" id="v:b" class="def"
>b</a
> :: [a]</p
><div class="doc"
@@ -1520,7 +1500,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:D" class="def"
+ > <a href="" id="t:D" class="def"
>D</a
> a <span class="keyword"
>where</span
@@ -1533,13 +1513,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:d" class="def"
+ ><a href="" id="v:d" class="def"
>d</a
> :: <a href=""
>T</a
> a b</p
><p class="src"
- ><a name="v:e" class="def"
+ ><a href="" id="v:e" class="def"
>e</a
> :: (a, a)</p
></div
@@ -1549,25 +1529,85 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><div id="section.i:D" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >D</a
- > <a href=""
- >Float</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:D:D:1" class="instance expander" onclick="toggleSection('i:ic:D:D:1')"
+ ></span
+ > <a href=""
+ >D</a
+ > <a href=""
+ >Float</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><a href=""
- >D</a
- > <a href=""
- >Int</a
+ ><td colspan="2"
+ ><div id="section.i:ic:D:D:1" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >d</a
+ > :: <a href=""
+ >T</a
+ > <a href=""
+ >Float</a
+ > b</p
+ ><p class="src"
+ ><a href=""
+ >e</a
+ > :: (<a href=""
+ >Float</a
+ >, <a href=""
+ >Float</a
+ >)</p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:D:D:2" class="instance expander" onclick="toggleSection('i:ic:D:D:2')"
+ ></span
+ > <a href=""
+ >D</a
+ > <a href=""
+ >Int</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:D:D:2" class="inst-details hide"
+ ><div class="subs methods"
+ ><p class="caption"
+ >Methods</p
+ ><p class="src"
+ ><a href=""
+ >d</a
+ > :: <a href=""
+ >T</a
+ > <a href=""
+ >Int</a
+ > b</p
+ ><p class="src"
+ ><a href=""
+ >e</a
+ > :: (<a href=""
+ >Int</a
+ >, <a href=""
+ >Int</a
+ >)</p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -1576,7 +1616,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:E" class="def"
+ > <a href="" id="t:E" class="def"
>E</a
> a</p
><div class="doc"
@@ -1594,7 +1634,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:F" class="def"
+ > <a href="" id="t:F" class="def"
>F</a
> a <span class="keyword"
>where</span
@@ -1603,7 +1643,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:ff" class="def"
+ ><a href="" id="v:ff" class="def"
>ff</a
> :: a</p
></div
@@ -1616,7 +1656,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Test.html");};
>Function types</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: <a href=""
>C</a
@@ -1678,7 +1718,7 @@ using double quotes: <a href=""
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: <a href=""
>Int</a
@@ -1787,7 +1827,7 @@ is at the beginning of the line).</pre
>A hidden module</h1
><div class="top"
><p class="src"
- ><a name="v:hidden" class="def"
+ ><a href="" id="v:hidden" class="def"
>hidden</a
> :: <a href=""
>Int</a
@@ -1813,7 +1853,7 @@ is at the beginning of the line).</pre
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Ex" class="def"
+ > <a href="" id="t:Ex" class="def"
>Ex</a
> a</p
><div class="doc"
@@ -1830,7 +1870,7 @@ is at the beginning of the line).</pre
>forall</span
> b . <a href=""
>C</a
- > b =&gt; <a name="v:Ex1" class="def"
+ > b =&gt; <a href="" id="v:Ex1" class="def"
>Ex1</a
> b</td
><td class="doc empty"
@@ -1840,7 +1880,7 @@ is at the beginning of the line).</pre
><td class="src"
><span class="keyword"
>forall</span
- > b . <a name="v:Ex2" class="def"
+ > b . <a href="" id="v:Ex2" class="def"
>Ex2</a
> b</td
><td class="doc empty"
@@ -1852,7 +1892,7 @@ is at the beginning of the line).</pre
>forall</span
> b . <a href=""
>C</a
- > a =&gt; <a name="v:Ex3" class="def"
+ > a =&gt; <a href="" id="v:Ex3" class="def"
>Ex3</a
> b</td
><td class="doc empty"
@@ -1860,7 +1900,7 @@ is at the beginning of the line).</pre
></tr
><tr
><td class="src"
- ><a name="v:Ex4" class="def"
+ ><a href="" id="v:Ex4" class="def"
>Ex4</a
> (<span class="keyword"
>forall</span
@@ -1875,7 +1915,7 @@ is at the beginning of the line).</pre
>Type signatures with argument docs</h1
><div class="top"
><p class="src"
- ><a name="v:k" class="def"
+ ><a href="" id="v:k" class="def"
>k</a
></p
><div class="subs arguments"
@@ -1963,7 +2003,7 @@ is at the beginning of the line).</pre
></div
><div class="top"
><p class="src"
- ><a name="v:l" class="def"
+ ><a href="" id="v:l" class="def"
>l</a
></p
><div class="subs arguments"
@@ -2003,7 +2043,7 @@ is at the beginning of the line).</pre
></div
><div class="top"
><p class="src"
- ><a name="v:m" class="def"
+ ><a href="" id="v:m" class="def"
>m</a
></p
><div class="subs arguments"
@@ -2049,7 +2089,7 @@ is at the beginning of the line).</pre
></div
><div class="top"
><p class="src"
- ><a name="v:o" class="def"
+ ><a href="" id="v:o" class="def"
>o</a
></p
><div class="subs arguments"
@@ -2099,7 +2139,7 @@ is at the beginning of the line).</pre
></div
><div class="top"
><p class="src"
- ><a name="v:f-39-" class="def"
+ ><a href="" id="v:f-39-" class="def"
>f'</a
> :: <a href=""
>Int</a
@@ -2116,7 +2156,7 @@ is at the beginning of the line).</pre
></div
><div class="top"
><p class="src"
- ><a name="v:withType" class="def"
+ ><a href="" id="v:withType" class="def"
>withType</a
> :: <a href=""
>Int</a
@@ -2128,7 +2168,7 @@ is at the beginning of the line).</pre
></div
><div class="top"
><p class="src"
- ><a name="v:withoutType" class="def"
+ ><a href="" id="v:withoutType" class="def"
>withoutType</a
> :: t</p
><div class="doc"
@@ -2142,7 +2182,7 @@ is at the beginning of the line).</pre
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Ticket253_1.html b/html-test/ref/Threaded.html
index 2853001c..1f54b9ea 100644
--- a/html-test/ref/Ticket253_1.html
+++ b/html-test/ref/Threaded.html
@@ -3,13 +3,13 @@
><head
><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/><title
- >Ticket253_1</title
+ >Threaded</title
><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
/><script src="haddock-util.js" type="text/javascript"
></script
><script type="text/javascript"
>//<![CDATA[
-window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_1.html");};
+window.onload = function () {pageLoad();setSynopsis("mini_Threaded.html");};
//]]>
</script
></head
@@ -35,11 +35,21 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_1.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >None</td
></tr
></table
><p class="caption"
- >Ticket253_1</p
+ >Threaded</p
+ ></div
+ ><div id="description"
+ ><p class="caption"
+ >Description</p
+ ><div class="doc"
+ ><p
+ >Ensures haddock built with <code
+ >-threaded</code
+ >.</p
+ ></div
></div
><div id="synopsis"
><p id="control.syn" class="caption expander" onclick="toggleSection('syn')"
@@ -47,9 +57,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_1.html");};
><ul id="section.syn" class="hide" onclick="toggleSection('syn')"
><li class="src short"
><a href=""
- >foo</a
+ >f</a
> :: <a href=""
- >Int</a
+ >Integer</a
></li
></ul
></div
@@ -58,24 +68,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_1.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
- >foo</a
+ ><a href="" id="v:f" class="def"
+ >f</a
> :: <a href=""
- >Int</a
+ >Integer</a
></p
><div class="doc"
><p
- >See <code
- ><a href=""
- >bar</a
- ></code
- >.</p
- ><p
- >Also see <code
- ><a href=""
- >Baz</a
- ></code
- ></p
+ ><code
+ >$(forkTH)</code
+ > fails at compile time if haddock isn't using the
+ threaded RTS.</p
></div
></div
></div
@@ -84,7 +87,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket253_1.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Ticket112.html b/html-test/ref/Ticket112.html
index 528787c7..4aefb488 100644
--- a/html-test/ref/Ticket112.html
+++ b/html-test/ref/Ticket112.html
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket112.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: a</p
><div class="doc"
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket112.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Ticket61.html b/html-test/ref/Ticket61.html
index 5a181e0c..aeb3c022 100644
--- a/html-test/ref/Ticket61.html
+++ b/html-test/ref/Ticket61.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket61.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket61.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:C" class="def"
+ > <a href="" id="t:C" class="def"
>C</a
> a <span class="keyword"
>where</span
@@ -57,7 +57,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket61.html");};
><p class="caption"
>Methods</p
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: a</p
><div class="doc"
@@ -72,7 +72,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket61.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Ticket75.html b/html-test/ref/Ticket75.html
index 26686701..169b0522 100644
--- a/html-test/ref/Ticket75.html
+++ b/html-test/ref/Ticket75.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket75.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -68,7 +68,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket75.html");};
><p class="src"
><span class="keyword"
>data</span
- > a <a name="t::-45-" class="def"
+ > a <a href="" id="t::-45-" class="def"
>:-</a
> b</p
><div class="subs constructors"
@@ -77,7 +77,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket75.html");};
><table
><tr
><td class="src"
- ><a name="v:Q" class="def"
+ ><a href="" id="v:Q" class="def"
>Q</a
></td
><td class="doc empty"
@@ -88,7 +88,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket75.html");};
></div
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: <a href=""
>Int</a
@@ -108,7 +108,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Ticket75.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/TitledPicture.html b/html-test/ref/TitledPicture.html
index f1353dfa..3aac9689 100644
--- a/html-test/ref/TitledPicture.html
+++ b/html-test/ref/TitledPicture.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TitledPicture.html");}
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -64,7 +64,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TitledPicture.html");}
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:foo" class="def"
+ ><a href="" id="v:foo" class="def"
>foo</a
> :: <a href=""
>Integer</a
@@ -81,7 +81,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TitledPicture.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:bar" class="def"
+ ><a href="" id="v:bar" class="def"
>bar</a
> :: <a href=""
>Integer</a
@@ -102,7 +102,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TitledPicture.html");}
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html
index 355d9248..3295318f 100644
--- a/html-test/ref/TypeFamilies.html
+++ b/html-test/ref/TypeFamilies.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -162,7 +162,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:X" class="def"
+ > <a href="" id="t:X" class="def"
>X</a
></p
><div class="doc"
@@ -175,7 +175,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><table
><tr
><td class="src"
- ><a name="v:X" class="def"
+ ><a href="" id="v:X" class="def"
>X</a
></td
><td class="doc"
@@ -185,7 +185,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></tr
><tr
><td class="src"
- ><a name="v:XX" class="def"
+ ><a href="" id="v:XX" class="def"
>XX</a
></td
><td class="doc"
@@ -195,7 +195,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></tr
><tr
><td class="src"
- ><a name="v:XXX" class="def"
+ ><a href="" id="v:XXX" class="def"
>XXX</a
></td
><td class="doc"
@@ -211,11 +211,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:X" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Assoc</a
- > * <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:X:Assoc:1" class="instance expander" onclick="toggleSection('i:id:X:Assoc:1')"
+ ></span
+ > <a href=""
+ >Assoc</a
+ > * <a href=""
+ >X</a
+ ></span
></td
><td class="doc"
><p
@@ -223,11 +227,41 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >Test</a
- > * <a href=""
- >X</a
+ ><td colspan="2"
+ ><div id="section.i:id:X:Assoc:1" class="inst-details hide"
+ ><div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >AssocD</a
+ > (<a href=""
+ >X</a
+ > :: k)</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >AssocT</a
+ > (<a href=""
+ >X</a
+ > :: k) :: *</p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:X:Test:2" class="instance expander" onclick="toggleSection('i:id:X:Test:2')"
+ ></span
+ > <a href=""
+ >Test</a
+ > * <a href=""
+ >X</a
+ ></span
></td
><td class="doc"
><p
@@ -235,29 +269,47 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >(&gt;&lt;)</a
- > <a href=""
- >X</a
- > <a href=""
- >XX</a
- > <a href=""
- >XXX</a
+ ><td colspan="2"
+ ><div id="section.i:id:X:Test:2" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:X:-62--60-:3" class="instance expander" onclick="toggleSection('i:id:X:-62--60-:3')"
+ ></span
+ > <a href=""
+ >(&gt;&lt;)</a
+ > <a href=""
+ >X</a
+ > <a href=""
+ >XX</a
+ > <a href=""
+ >XXX</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > <a href=""
- >X</a
- > = <a href=""
- >Y</a
+ ><td colspan="2"
+ ><div id="section.i:id:X:-62--60-:3" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >X</a
+ > = <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -265,69 +317,75 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >AssocD</a
- > * <a href=""
- >X</a
- > = <a name="v:AssocX" class="def"
- >AssocX</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >AssocD</a
+ > * <a href=""
+ >X</a
+ > = <a href="" id="v:AssocX" class="def"
+ >AssocX</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >AssocT</a
- > * <a href=""
- >X</a
- > = <a href=""
- >Foo</a
- > * <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >AssocT</a
+ > * <a href=""
+ >X</a
+ > = <a href=""
+ >Foo</a
+ > * <a href=""
+ >X</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bat</a
- > * <a href=""
- >X</a
- > <ul class="inst"
- ><li class="inst"
- >= <a name="v:BatX" class="def"
- >BatX</a
- > <a href=""
- >X</a
- ></li
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bat</a
+ > * <a href=""
+ >X</a
+ > <ul class="inst"
><li class="inst"
- >| <a name="v:BatXX" class="def"
- >BatXX</a
- > { <ul class="subs"
- ><li
- ><a name="v:aaa" class="def"
- >aaa</a
- > :: <a href=""
- >X</a
- ></li
+ >= <a href="" id="v:BatX" class="def"
+ >BatX</a
+ > <a href=""
+ >X</a
+ ></li
+ ><li class="inst"
+ >| <a href="" id="v:BatXX" class="def"
+ >BatXX</a
+ > { <ul class="subs"
><li
- ><a name="v:bbb" class="def"
- >bbb</a
- > :: <a href=""
- >Y</a
- ></li
- ></ul
- > }</li
- ></ul
+ ><a href="" id="v:aaa" class="def"
+ >aaa</a
+ > :: <a href=""
+ >X</a
+ ></li
+ ><li
+ ><a href="" id="v:bbb" class="def"
+ >bbb</a
+ > :: <a href=""
+ >Y</a
+ ></li
+ ></ul
+ > }</li
+ ></ul
+ ></span
></td
><td class="doc"
><p
@@ -335,15 +393,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > * <a href=""
- >X</a
- > = <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > * <a href=""
+ >X</a
+ > = <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -351,33 +411,37 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >(&lt;&gt;)</a
- > * <a href=""
- >X</a
- > a = <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >(&lt;&gt;)</a
+ > * <a href=""
+ >X</a
+ > a = <a href=""
+ >X</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >(&lt;&gt;)</a
- > <a href=""
- >X</a
- > <a href=""
- >XXX</a
- > <a href=""
- >XX</a
- > = <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >(&lt;&gt;)</a
+ > <a href=""
+ >X</a
+ > <a href=""
+ >XXX</a
+ > <a href=""
+ >XX</a
+ > = <a href=""
+ >X</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
@@ -390,7 +454,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Y" class="def"
+ > <a href="" id="t:Y" class="def"
>Y</a
></p
><div class="doc"
@@ -403,11 +467,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:Y" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Assoc</a
- > * <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:Y:Assoc:1" class="instance expander" onclick="toggleSection('i:id:Y:Assoc:1')"
+ ></span
+ > <a href=""
+ >Assoc</a
+ > * <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -415,11 +483,41 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >Test</a
- > * <a href=""
- >Y</a
+ ><td colspan="2"
+ ><div id="section.i:id:Y:Assoc:1" class="inst-details hide"
+ ><div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >AssocD</a
+ > (<a href=""
+ >Y</a
+ > :: k)</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >AssocT</a
+ > (<a href=""
+ >Y</a
+ > :: k) :: *</p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:id:Y:Test:2" class="instance expander" onclick="toggleSection('i:id:Y:Test:2')"
+ ></span
+ > <a href=""
+ >Test</a
+ > * <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -427,59 +525,73 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bar</a
- > <a href=""
- >Y</a
+ ><td colspan="2"
+ ><div id="section.i:id:Y:Test:2" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bar</a
+ > <a href=""
+ >Y</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >AssocD</a
- > * <a href=""
- >Y</a
- > = <a name="v:AssocY" class="def"
- >AssocY</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >AssocD</a
+ > * <a href=""
+ >Y</a
+ > = <a href="" id="v:AssocY" class="def"
+ >AssocY</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >AssocT</a
- > * <a href=""
- >Y</a
- > = <a href=""
- >Bat</a
- > * <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >AssocT</a
+ > * <a href=""
+ >Y</a
+ > = <a href=""
+ >Bat</a
+ > * <a href=""
+ >Y</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bat</a
- > * <a href=""
- >Y</a
- > = <a name="v:BatY" class="def"
- >BatY</a
- > <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bat</a
+ > * <a href=""
+ >Y</a
+ > = <a href="" id="v:BatY" class="def"
+ >BatY</a
+ > <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -487,15 +599,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > * <a href=""
- >Y</a
- > = <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > * <a href=""
+ >Y</a
+ > = <a href=""
+ >X</a
+ ></span
></td
><td class="doc"
><p
@@ -503,14 +617,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >(&lt;&gt;)</a
- > * <a href=""
- >Y</a
- > a = a</td
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >(&lt;&gt;)</a
+ > * <a href=""
+ >Y</a
+ > a = a</span
+ ></td
><td class="doc empty"
>&nbsp;</td
></tr
@@ -522,7 +638,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Z" class="def"
+ > <a href="" id="t:Z" class="def"
>Z</a
></p
><div class="doc"
@@ -535,7 +651,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><table
><tr
><td class="src"
- ><a name="v:ZA" class="def"
+ ><a href="" id="v:ZA" class="def"
>ZA</a
></td
><td class="doc empty"
@@ -543,7 +659,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></tr
><tr
><td class="src"
- ><a name="v:ZB" class="def"
+ ><a href="" id="v:ZB" class="def"
>ZB</a
></td
><td class="doc empty"
@@ -557,53 +673,55 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:Z" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bat</a
- > <a href=""
- >Z</a
- > <span class="keyword"
- >where</span
- ><ul class="inst"
- ><li class="inst"
- ><a name="v:BatZ1" class="def"
- >BatZ1</a
- > :: <a href=""
- >Z</a
- > -&gt; <a href=""
- >Bat</a
- > <a href=""
- >Z</a
- > <a href=""
- >ZA</a
- ></li
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bat</a
+ > <a href=""
+ >Z</a
+ > <span class="keyword"
+ >where</span
+ ><ul class="inst"
><li class="inst"
- ><a name="v:BatZ2" class="def"
- >BatZ2</a
- > :: { <ul class="subs"
- ><li
- ><a name="v:batx" class="def"
- >batx</a
- > :: <a href=""
- >X</a
- ></li
+ ><a href="" id="v:BatZ1" class="def"
+ >BatZ1</a
+ > :: <a href=""
+ >Z</a
+ > -&gt; <a href=""
+ >Bat</a
+ > <a href=""
+ >Z</a
+ > <a href=""
+ >ZA</a
+ ></li
+ ><li class="inst"
+ ><a href="" id="v:BatZ2" class="def"
+ >BatZ2</a
+ > :: { <ul class="subs"
><li
- ><a name="v:baty" class="def"
- >baty</a
- > :: <a href=""
- >Y</a
- ></li
- ></ul
- > } -&gt; <a href=""
- >Bat</a
- > <a href=""
- >Z</a
- > <a href=""
- >ZB</a
- ></li
- ></ul
+ ><a href="" id="v:batx" class="def"
+ >batx</a
+ > :: <a href=""
+ >X</a
+ ></li
+ ><li
+ ><a href="" id="v:baty" class="def"
+ >baty</a
+ > :: <a href=""
+ >Y</a
+ ></li
+ ></ul
+ > } -&gt; <a href=""
+ >Bat</a
+ > <a href=""
+ >Z</a
+ > <a href=""
+ >ZB</a
+ ></li
+ ></ul
+ ></span
></td
><td class="doc"
><p
@@ -618,7 +736,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Test" class="def"
+ > <a href="" id="t:Test" class="def"
>Test</a
> a</p
><div class="doc"
@@ -631,11 +749,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:Test" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Test</a
- > * <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Test:Test:1" class="instance expander" onclick="toggleSection('i:ic:Test:Test:1')"
+ ></span
+ > <a href=""
+ >Test</a
+ > * <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -643,17 +765,33 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >Test</a
- > * <a href=""
- >X</a
+ ><td colspan="2"
+ ><div id="section.i:ic:Test:Test:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Test:Test:2" class="instance expander" onclick="toggleSection('i:ic:Test:Test:2')"
+ ></span
+ > <a href=""
+ >Test</a
+ > * <a href=""
+ >X</a
+ ></span
></td
><td class="doc"
><p
>Doc for: instance Test X</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:Test:Test:2" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -662,7 +800,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>type family</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
> a :: k</p
><div class="doc"
@@ -675,15 +813,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:Foo" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > * <a href=""
- >Y</a
- > = <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > * <a href=""
+ >Y</a
+ > = <a href=""
+ >X</a
+ ></span
></td
><td class="doc"
><p
@@ -691,15 +831,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > * <a href=""
- >X</a
- > = <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > * <a href=""
+ >X</a
+ > = <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -714,7 +856,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>data family</span
- > <a name="t:Bat" class="def"
+ > <a href="" id="t:Bat" class="def"
>Bat</a
> a :: *</p
><div class="doc"
@@ -727,53 +869,55 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:Bat" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bat</a
- > <a href=""
- >Z</a
- > <span class="keyword"
- >where</span
- ><ul class="inst"
- ><li class="inst"
- ><a name="v:BatZ1" class="def"
- >BatZ1</a
- > :: <a href=""
- >Z</a
- > -&gt; <a href=""
- >Bat</a
- > <a href=""
- >Z</a
- > <a href=""
- >ZA</a
- ></li
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bat</a
+ > <a href=""
+ >Z</a
+ > <span class="keyword"
+ >where</span
+ ><ul class="inst"
><li class="inst"
- ><a name="v:BatZ2" class="def"
- >BatZ2</a
- > :: { <ul class="subs"
- ><li
- ><a name="v:batx" class="def"
- >batx</a
- > :: <a href=""
- >X</a
- ></li
+ ><a href="" id="v:BatZ1" class="def"
+ >BatZ1</a
+ > :: <a href=""
+ >Z</a
+ > -&gt; <a href=""
+ >Bat</a
+ > <a href=""
+ >Z</a
+ > <a href=""
+ >ZA</a
+ ></li
+ ><li class="inst"
+ ><a href="" id="v:BatZ2" class="def"
+ >BatZ2</a
+ > :: { <ul class="subs"
><li
- ><a name="v:baty" class="def"
- >baty</a
- > :: <a href=""
- >Y</a
- ></li
- ></ul
- > } -&gt; <a href=""
- >Bat</a
- > <a href=""
- >Z</a
- > <a href=""
- >ZB</a
- ></li
- ></ul
+ ><a href="" id="v:batx" class="def"
+ >batx</a
+ > :: <a href=""
+ >X</a
+ ></li
+ ><li
+ ><a href="" id="v:baty" class="def"
+ >baty</a
+ > :: <a href=""
+ >Y</a
+ ></li
+ ></ul
+ > } -&gt; <a href=""
+ >Bat</a
+ > <a href=""
+ >Z</a
+ > <a href=""
+ >ZB</a
+ ></li
+ ></ul
+ ></span
></td
><td class="doc"
><p
@@ -781,17 +925,19 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bat</a
- > * <a href=""
- >Y</a
- > = <a name="v:BatY" class="def"
- >BatY</a
- > <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bat</a
+ > * <a href=""
+ >Y</a
+ > = <a href="" id="v:BatY" class="def"
+ >BatY</a
+ > <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -799,39 +945,41 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bat</a
- > * <a href=""
- >X</a
- > <ul class="inst"
- ><li class="inst"
- >= <a name="v:BatX" class="def"
- >BatX</a
- > <a href=""
- >X</a
- ></li
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bat</a
+ > * <a href=""
+ >X</a
+ > <ul class="inst"
><li class="inst"
- >| <a name="v:BatXX" class="def"
- >BatXX</a
- > { <ul class="subs"
- ><li
- ><a name="v:aaa" class="def"
- >aaa</a
- > :: <a href=""
- >X</a
- ></li
+ >= <a href="" id="v:BatX" class="def"
+ >BatX</a
+ > <a href=""
+ >X</a
+ ></li
+ ><li class="inst"
+ >| <a href="" id="v:BatXX" class="def"
+ >BatXX</a
+ > { <ul class="subs"
><li
- ><a name="v:bbb" class="def"
- >bbb</a
- > :: <a href=""
- >Y</a
- ></li
- ></ul
- > }</li
- ></ul
+ ><a href="" id="v:aaa" class="def"
+ >aaa</a
+ > :: <a href=""
+ >X</a
+ ></li
+ ><li
+ ><a href="" id="v:bbb" class="def"
+ >bbb</a
+ > :: <a href=""
+ >Y</a
+ ></li
+ ></ul
+ > }</li
+ ></ul
+ ></span
></td
><td class="doc"
><p
@@ -846,7 +994,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>class</span
- > <a name="t:Assoc" class="def"
+ > <a href="" id="t:Assoc" class="def"
>Assoc</a
> a</p
><div class="doc"
@@ -859,7 +1007,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:AssocD" class="def"
+ > <a href="" id="t:AssocD" class="def"
>AssocD</a
> a :: *</p
><div class="doc"
@@ -869,7 +1017,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>type</span
- > <a name="t:AssocT" class="def"
+ > <a href="" id="t:AssocT" class="def"
>AssocT</a
> a :: *</p
><div class="doc"
@@ -883,11 +1031,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:Assoc" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >Assoc</a
- > * <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Assoc:Assoc:1" class="instance expander" onclick="toggleSection('i:ic:Assoc:Assoc:1')"
+ ></span
+ > <a href=""
+ >Assoc</a
+ > * <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -895,17 +1047,73 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
></td
></tr
><tr
- ><td class="src"
- ><a href=""
- >Assoc</a
- > * <a href=""
- >X</a
+ ><td colspan="2"
+ ><div id="section.i:ic:Assoc:Assoc:1" class="inst-details hide"
+ ><div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >AssocD</a
+ > (<a href=""
+ >Y</a
+ > :: k)</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >AssocT</a
+ > (<a href=""
+ >Y</a
+ > :: k) :: *</p
+ ></div
+ ></div
+ ></td
+ ></tr
+ ><tr
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:Assoc:Assoc:2" class="instance expander" onclick="toggleSection('i:ic:Assoc:Assoc:2')"
+ ></span
+ > <a href=""
+ >Assoc</a
+ > * <a href=""
+ >X</a
+ ></span
></td
><td class="doc"
><p
>Doc for: instance Assoc X</p
></td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:Assoc:Assoc:2" class="inst-details hide"
+ ><div class="subs associated-types"
+ ><p class="caption"
+ >Associated Types</p
+ ><p class="src"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >AssocD</a
+ > (<a href=""
+ >X</a
+ > :: k)</p
+ ><p class="src"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >AssocT</a
+ > (<a href=""
+ >X</a
+ > :: k) :: *</p
+ ></div
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -914,7 +1122,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>type family</span
- > <a name="t:Bar" class="def"
+ > <a href="" id="t:Bar" class="def"
>Bar</a
> b</p
><div class="doc"
@@ -954,7 +1162,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>type family</span
- > a <a name="t:-60--62-" class="def"
+ > a <a href="" id="t:-60--62-" class="def"
>&lt;&gt;</a
> b :: k</p
><div class="subs instances"
@@ -963,45 +1171,51 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:-60--62-" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >(&lt;&gt;)</a
- > * <a href=""
- >Y</a
- > a = a</td
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >(&lt;&gt;)</a
+ > * <a href=""
+ >Y</a
+ > a = a</span
+ ></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >(&lt;&gt;)</a
- > * <a href=""
- >X</a
- > a = <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >(&lt;&gt;)</a
+ > * <a href=""
+ >X</a
+ > a = <a href=""
+ >X</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >(&lt;&gt;)</a
- > <a href=""
- >X</a
- > <a href=""
- >XXX</a
- > <a href=""
- >XX</a
- > = <a href=""
- >X</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >(&lt;&gt;)</a
+ > <a href=""
+ >X</a
+ > <a href=""
+ >XXX</a
+ > <a href=""
+ >XX</a
+ > = <a href=""
+ >X</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
@@ -1014,7 +1228,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p class="src"
><span class="keyword"
>class</span
- > a <a name="t:-62--60-" class="def"
+ > a <a href="" id="t:-62--60-" class="def"
>&gt;&lt;</a
> b</p
><div class="subs instances"
@@ -1023,19 +1237,29 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><div id="section.i:-62--60-" class="show"
><table
><tr
- ><td class="src"
- ><a href=""
- >(&gt;&lt;)</a
- > <a href=""
- >X</a
- > <a href=""
- >XX</a
- > <a href=""
- >XXX</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span id="control.i:ic:-62--60-:-62--60-:1" class="instance expander" onclick="toggleSection('i:ic:-62--60-:-62--60-:1')"
+ ></span
+ > <a href=""
+ >(&gt;&lt;)</a
+ > <a href=""
+ >X</a
+ > <a href=""
+ >XX</a
+ > <a href=""
+ >XXX</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
></tr
+ ><tr
+ ><td colspan="2"
+ ><div id="section.i:ic:-62--60-:-62--60-:1" class="inst-details hide"
+ ></div
+ ></td
+ ></tr
></table
></div
></div
@@ -1046,7 +1270,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/TypeFamilies2.html b/html-test/ref/TypeFamilies2.html
index 38c45a95..0c7e4ec6 100644
--- a/html-test/ref/TypeFamilies2.html
+++ b/html-test/ref/TypeFamilies2.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -72,7 +72,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:W" class="def"
+ > <a href="" id="t:W" class="def"
>W</a
></p
><div class="doc"
@@ -85,29 +85,33 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><div id="section.i:W" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bar</a
- > <a href=""
- >W</a
- > = <a name="v:BarX" class="def"
- >BarX</a
- > Z</td
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bar</a
+ > <a href=""
+ >W</a
+ > = <a href="" id="v:BarX" class="def"
+ >BarX</a
+ > Z</span
+ ></td
><td class="doc"
><p
>Shown because BarX is still exported despite Z being hidden</p
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > <a href=""
- >W</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >W</a
+ ></span
></td
><td class="doc"
><p
@@ -122,7 +126,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><p class="src"
><span class="keyword"
>type family</span
- > <a name="t:Foo" class="def"
+ > <a href="" id="t:Foo" class="def"
>Foo</a
> a</p
><div class="doc"
@@ -135,13 +139,15 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><div id="section.i:Foo" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > <a href=""
- >W</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >W</a
+ ></span
></td
><td class="doc"
><p
@@ -149,15 +155,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >type</span
- > <a href=""
- >Foo</a
- > <a href=""
- >X</a
- > = <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >type</span
+ > <a href=""
+ >Foo</a
+ > <a href=""
+ >X</a
+ > = <a href=""
+ >Y</a
+ ></span
></td
><td class="doc"
><p
@@ -172,7 +180,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><p class="src"
><span class="keyword"
>data family</span
- > <a name="t:Bar" class="def"
+ > <a href="" id="t:Bar" class="def"
>Bar</a
> a</p
><div class="doc"
@@ -185,29 +193,33 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><div id="section.i:Bar" class="show"
><table
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bar</a
- > <a href=""
- >W</a
- > = <a name="v:BarX" class="def"
- >BarX</a
- > Z</td
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bar</a
+ > <a href=""
+ >W</a
+ > = <a href="" id="v:BarX" class="def"
+ >BarX</a
+ > Z</span
+ ></td
><td class="doc"
><p
>Shown because BarX is still exported despite Z being hidden</p
></td
></tr
><tr
- ><td class="src"
- ><span class="keyword"
- >data</span
- > <a href=""
- >Bar</a
- > <a href=""
- >Y</a
+ ><td class="src clearfix"
+ ><span class="inst-left"
+ ><span class="keyword"
+ >data</span
+ > <a href=""
+ >Bar</a
+ > <a href=""
+ >Y</a
+ ></span
></td
><td class="doc empty"
>&nbsp;</td
@@ -222,7 +234,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/TypeOperators.html b/html-test/ref/TypeOperators.html
index 2e80bf9f..283083be 100644
--- a/html-test/ref/TypeOperators.html
+++ b/html-test/ref/TypeOperators.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -48,7 +48,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><p class="src"
><span class="keyword"
>data</span
- > a <a name="t::-45-:" class="def"
+ > a <a href="" id="t::-45-:" class="def"
>:-:</a
> b</p
></div
@@ -56,7 +56,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><p class="src"
><span class="keyword"
>data</span
- > (a <a name="t::-43-:" class="def"
+ > (a <a href="" id="t::-43-:" class="def"
>:+:</a
> b) c</p
></div
@@ -64,7 +64,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><p class="src"
><span class="keyword"
>data</span
- > <a name="t:Op" class="def"
+ > <a href="" id="t:Op" class="def"
>Op</a
> a b</p
></div
@@ -72,7 +72,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><p class="src"
><span class="keyword"
>newtype</span
- > <a name="t:O" class="def"
+ > <a href="" id="t:O" class="def"
>O</a
> g f a</p
><div class="subs constructors"
@@ -81,7 +81,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><table
><tr
><td class="src"
- ><a name="v:O" class="def"
+ ><a href="" id="v:O" class="def"
>O</a
></td
><td class="doc empty"
@@ -92,16 +92,16 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><div class="subs fields"
><p class="caption"
>Fields</p
- ><dl
- ><dt class="src"
- ><a name="v:unO" class="def"
- >unO</a
- > :: g (f a)</dt
- ><dd class="doc empty"
- >&nbsp;</dd
- ></dl
- ><div class="clear"
- ></div
+ ><ul
+ ><li
+ ><dfn class="src"
+ ><a href="" id="v:unO" class="def"
+ >unO</a
+ > :: g (f a)</dfn
+ ><div class="doc empty"
+ >&nbsp;</div
+ ></li
+ ></ul
></div
></td
></tr
@@ -112,13 +112,13 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><p class="src"
><span class="keyword"
>class</span
- > a <a name="t:-60--61--62-" class="def"
+ > a <a href="" id="t:-60--61--62-" class="def"
>&lt;=&gt;</a
> b</p
></div
><div class="top"
><p class="src"
- ><a name="v:biO" class="def"
+ ><a href="" id="v:biO" class="def"
>biO</a
> :: (g <a href=""
>`O`</a
@@ -126,19 +126,19 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:f" class="def"
+ ><a href="" id="v:f" class="def"
>f</a
> :: (a ~ b) =&gt; a -&gt; b</p
></div
><div class="top"
><p class="src"
- ><a name="v:g" class="def"
+ ><a href="" id="v:g" class="def"
>g</a
> :: (a ~ b, b ~ c) =&gt; a -&gt; c</p
></div
><div class="top"
><p class="src"
- ><a name="v:x" class="def"
+ ><a href="" id="v:x" class="def"
>x</a
> :: (a <a href=""
>:-:</a
@@ -150,7 +150,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
></div
><div class="top"
><p class="src"
- ><a name="v:y" class="def"
+ ><a href="" id="v:y" class="def"
>y</a
> :: (a <a href=""
>&lt;=&gt;</a
@@ -166,7 +166,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeOperators.html");}
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Unicode.html b/html-test/ref/Unicode.html
index 56f98571..d724ecd7 100644
--- a/html-test/ref/Unicode.html
+++ b/html-test/ref/Unicode.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Unicode.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -58,7 +58,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Unicode.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:x" class="def"
+ ><a href="" id="v:x" class="def"
>x</a
> :: <a href=""
>Int</a
@@ -74,7 +74,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Unicode.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/Visible.html b/html-test/ref/Visible.html
index 5abeda94..54a04e86 100644
--- a/html-test/ref/Visible.html
+++ b/html-test/ref/Visible.html
@@ -35,7 +35,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Visible.html");};
><th
>Safe Haskell</th
><td
- >Safe-Inferred</td
+ >Safe</td
></tr
></table
><p class="caption"
@@ -46,7 +46,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Visible.html");};
>Documentation</h1
><div class="top"
><p class="src"
- ><a name="v:visible" class="def"
+ ><a href="" id="v:visible" class="def"
>visible</a
> :: <a href=""
>Int</a
@@ -60,7 +60,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Visible.html");};
><p
>Produced by <a href=""
>Haddock</a
- > version 2.15.0</p
+ > version 2.16.2</p
></div
></body
></html
diff --git a/html-test/ref/frames.html b/html-test/ref/frames.html
index 1b4e38d4..e86edb66 100644
--- a/html-test/ref/frames.html
+++ b/html-test/ref/frames.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html
+<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
diff --git a/html-test/ref/haddock-util.js b/html-test/ref/haddock-util.js
index 9a6fccf7..fc7743fe 100644
--- a/html-test/ref/haddock-util.js
+++ b/html-test/ref/haddock-util.js
@@ -131,11 +131,11 @@ function perform_search(full)
var text = document.getElementById("searchbox").value.toLowerCase();
if (text == last_search && !full) return;
last_search = text;
-
+
var table = document.getElementById("indexlist");
var status = document.getElementById("searchmsg");
var children = table.firstChild.childNodes;
-
+
// first figure out the first node with the prefix
var first = bisect(-1);
var last = (first == -1 ? -1 : bisect(1));
@@ -166,7 +166,7 @@ function perform_search(full)
status.innerHTML = "";
}
-
+
function setclass(first, last, status)
{
for (var i = first; i <= last; i++)
@@ -174,8 +174,8 @@ function perform_search(full)
children[i].className = status;
}
}
-
-
+
+
// do a binary search, treating 0 as ...
// return either -1 (no 0's found) or location of most far match
function bisect(dir)
@@ -201,9 +201,9 @@ function perform_search(full)
if (checkitem(i) == 0) return i;
}
return -1;
- }
-
-
+ }
+
+
// from an index, decide what the result is
// 0 = match, -1 is lower, 1 is higher
function checkitem(i)
@@ -212,8 +212,8 @@ function perform_search(full)
if (s == text) return 0;
else return (s > text ? -1 : 1);
}
-
-
+
+
// from an index, get its string
// this abstracts over alternates
function getitem(i)
@@ -229,7 +229,7 @@ function perform_search(full)
}
function setSynopsis(filename) {
- if (parent.window.synopsis) {
+ if (parent.window.synopsis && parent.window.synopsis.location) {
if (parent.window.synopsis.location.replace) {
// In Firefox this avoids adding the change to the history.
parent.window.synopsis.location.replace(filename);
@@ -250,7 +250,7 @@ function addMenuItem(html) {
function adjustForFrames() {
var bodyCls;
-
+
if (parent.location.href == window.location.href) {
// not in frames, so add Frames button
addMenuItem("<a href='#' onclick='reframe();return true;'>Frames</a>");
diff --git a/html-test/ref/mini_FunArgs.html b/html-test/ref/mini_FunArgs.html
index 89729720..eac6c8fe 100644
--- a/html-test/ref/mini_FunArgs.html
+++ b/html-test/ref/mini_FunArgs.html
@@ -31,6 +31,24 @@ window.onload = function () {pageLoad();};
>g</a
></p
></div
+ ><div class="top"
+ ><p class="src"
+ ><a href="" target="main"
+ >h</a
+ ></p
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><a href="" target="main"
+ >i</a
+ ></p
+ ></div
+ ><div class="top"
+ ><p class="src"
+ ><a href="" target="main"
+ >j</a
+ ></p
+ ></div
></div
></body
></html
diff --git a/html-test/ref/ocean.css b/html-test/ref/ocean.css
index de436324..428040bc 100644
--- a/html-test/ref/ocean.css
+++ b/html-test/ref/ocean.css
@@ -41,6 +41,9 @@ a[href]:link { color: rgb(196,69,29); }
a[href]:visited { color: rgb(171,105,84); }
a[href]:hover { text-decoration:underline; }
+a[href].def:link, a[href].def:visited { color: black; }
+a[href].def:hover { color: rgb(78, 98, 114); }
+
/* @end */
/* @group Fonts & Sizes */
@@ -143,15 +146,21 @@ ul.links li a {
background-image: url(plus.gif);
background-repeat: no-repeat;
}
-p.caption.collapser,
-p.caption.expander {
- background-position: 0 0.4em;
-}
.collapser, .expander {
padding-left: 14px;
margin-left: -14px;
cursor: pointer;
}
+p.caption.collapser,
+p.caption.expander {
+ background-position: 0 0.4em;
+}
+
+.instance.collapser, .instance.expander {
+ margin-left: 0px;
+ background-position: left center;
+}
+
pre {
padding: 0.25em;
@@ -318,6 +327,7 @@ div#style-menu-holder {
height: 80%;
top: 10%;
padding: 0;
+ max-width: 75%;
}
#synopsis .caption {
@@ -378,6 +388,15 @@ div#style-menu-holder {
margin: 0 -0.5em 0 0.5em;
}
+#interface td.src .link {
+ float: right;
+ color: #919191;
+ border-left: 1px solid #919191;
+ background: #f0f0f0;
+ padding: 0 0.5em 0.2em;
+ margin: 0 -0.5em 0 0.5em;
+}
+
#interface span.fixity {
color: #919191;
border-left: 1px solid #919191;
@@ -406,30 +425,39 @@ div#style-menu-holder {
margin-top: 0.8em;
}
-.subs dl {
+.clearfix:after {
+ clear: both;
+ content: " ";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+
+.subs ul {
+ list-style: none;
+ display: table;
margin: 0;
}
-.subs dt {
- float: left;
- clear: left;
- display: block;
+.subs ul li {
+ display: table-row;
+}
+
+.subs ul li dfn {
+ display: table-cell;
+ font-style: normal;
+ font-weight: bold;
margin: 1px 0;
+ white-space: nowrap;
}
-.subs dd {
- float: right;
- width: 90%;
- display: block;
+.subs ul li > .doc {
+ display: table-cell;
padding-left: 0.5em;
margin-bottom: 0.5em;
}
-.subs dd.empty {
- display: none;
-}
-
-.subs dd p {
+.subs ul li > .doc p {
margin: 0;
}
@@ -445,6 +473,11 @@ div#style-menu-holder {
margin-left: 1em;
}
+/* Workaround for bug in Firefox (issue #384) */
+.inst-left {
+ float: left;
+}
+
.top p.src {
border-top: 1px solid #ccc;
}
diff --git a/html-test/run.lhs b/html-test/run.lhs
index a80b265e..1f19b723 100755
--- a/html-test/run.lhs
+++ b/html-test/run.lhs
@@ -21,7 +21,6 @@ import System.Exit
import System.FilePath
import System.Process (ProcessHandle, runProcess, waitForProcess, system)
-
packageRoot, dataDir, haddockPath, baseDir, testDir, outDir :: FilePath
baseDir = takeDirectory __FILE__
testDir = baseDir </> "src"
@@ -112,11 +111,11 @@ check modules strict = do
then do
out <- readFile outfile
ref <- readFile reffile
- if not $ haddockEq out ref
+ if not $ haddockEq (outfile, out) (reffile, ref)
then do
putStrLn $ "Output for " ++ mod ++ " has changed! Exiting with diff:"
- let ref' = stripLinks ref
- out' = stripLinks out
+ let ref' = maybeStripLinks outfile ref
+ out' = maybeStripLinks reffile out
let reffile' = outDir </> takeFileName reffile ++ ".nolinks"
outfile' = outDir </> takeFileName outfile ++ ".ref.nolinks"
writeFile reffile' ref'
@@ -134,6 +133,10 @@ check modules strict = do
else do
putStrLn $ "Pass: " ++ mod ++ " (no .ref file)"
+-- | List of modules in which we don't 'stripLinks'
+preserveLinksModules :: [String]
+preserveLinksModules = map (++ ".html") ["Bug253"]
+
-- | A rather nasty way to drop the Haddock version string from the
-- end of the generated HTML files so that we don't have to change
-- every single test every time we change versions. We rely on the the
@@ -146,9 +149,16 @@ dropVersion = reverse . dropTillP . reverse
dropTillP ('p':'<':xs) = xs
dropTillP (_:xs) = dropTillP xs
-haddockEq :: String -> String -> Bool
-haddockEq file1 file2 =
- stripLinks (dropVersion file1) == stripLinks (dropVersion file2)
+haddockEq :: (FilePath, String) -> (FilePath, String) -> Bool
+haddockEq (fn1, file1) (fn2, file2) =
+ maybeStripLinks fn1 (dropVersion file1)
+ == maybeStripLinks fn2 (dropVersion file2)
+
+maybeStripLinks :: String -- ^ Module we're considering for stripping
+ -> String -> String
+maybeStripLinks m = if any (`isSuffixOf` m) preserveLinksModules
+ then id
+ else stripLinks
stripLinks :: String -> String
stripLinks str =
diff --git a/html-test/src/AdvanceTypes.hs b/html-test/src/AdvanceTypes.hs
deleted file mode 100644
index 939fdf07..00000000
--- a/html-test/src/AdvanceTypes.hs
+++ /dev/null
@@ -1,9 +0,0 @@
-{-# LANGUAGE DataKinds #-}
-{-# LANGUAGE GADTs #-}
-{-# LANGUAGE KindSignatures #-}
-{-# LANGUAGE TypeOperators #-}
-module AdvanceTypes where
-
-data Pattern :: [*] -> * where
- Nil :: Pattern '[]
- Cons :: Maybe h -> Pattern t -> Pattern (h ': t)
diff --git a/html-test/src/Bug253.hs b/html-test/src/Bug253.hs
new file mode 100644
index 00000000..499f6cd4
--- /dev/null
+++ b/html-test/src/Bug253.hs
@@ -0,0 +1,10 @@
+-- | This module tests that if we're trying to link to a /qualified/
+-- identifier that's not in scope, we get an anchor as if it was a
+-- variable. Previous behaviour was to treat it as a type constructor
+-- so issue like #253 arose. Also see @rename@ function comments in
+-- source.
+module Bug253 where
+
+-- | This link should generate @#v@ anchor: 'DoesNotExist.fakeFakeFake'
+foo :: ()
+foo = ()
diff --git a/html-test/src/Bug387.hs b/html-test/src/Bug387.hs
new file mode 100644
index 00000000..d9fed34e
--- /dev/null
+++ b/html-test/src/Bug387.hs
@@ -0,0 +1,12 @@
+module Bug387
+ ( -- * Section1#a:section1#
+ test1
+ -- * Section2#a:section2#
+ , test2
+ ) where
+
+test1 :: Int
+test1 = 223
+
+test2 :: Int
+test2 = 42
diff --git a/html-test/src/Bug8.hs b/html-test/src/Bug8.hs
index e569b01d..30afae1f 100644
--- a/html-test/src/Bug8.hs
+++ b/html-test/src/Bug8.hs
@@ -7,6 +7,7 @@ data Typ = Type (Typ,[Typ])
| TFree (Typ, [Typ])
x --> y = Type(s,[s,t])
+(--->) :: (Foldable t0) => t0 t -> Typ -> Typ
(--->) = flip $ foldr (-->)
s = undefined
diff --git a/html-test/src/Bugs.hs b/html-test/src/Bugs.hs
index 8e1f0079..e60bbe8f 100644
--- a/html-test/src/Bugs.hs
+++ b/html-test/src/Bugs.hs
@@ -1,3 +1,3 @@
module Bugs where
-data A a = A a (a -> Int)
+data A a = A a (a -> Int)
diff --git a/html-test/src/Instances.hs b/html-test/src/Instances.hs
new file mode 100644
index 00000000..545c8534
--- /dev/null
+++ b/html-test/src/Instances.hs
@@ -0,0 +1,99 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE ImpredicativeTypes #-}
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeOperators #-}
+
+
+module Instances where
+
+
+newtype (<~~) a b = Xyzzy (b -> (a, a))
+
+
+class Foo f where
+
+ foo :: f Int -> a -> f a
+ foo' :: f (f a) -> Int -> f (f Int)
+
+ foo = undefined
+ foo' = undefined
+
+instance Foo Maybe
+instance Foo []
+instance (Eq a, Foo f) => Foo ((,) (f a))
+instance Foo (Either a)
+instance Foo ((,,) a a)
+instance Foo ((->) a)
+instance Foo ((<~~) a)
+
+
+class Foo f => Bar f a where
+
+ bar :: f a -> f Bool -> a
+ bar' :: f (f a) -> f (f (f b))
+ bar0, bar1 :: (f a, f a) -> (f b, f c)
+
+ bar = undefined
+ bar' = undefined
+ bar0 = undefined
+ bar1 = undefined
+
+
+instance Bar Maybe Bool
+instance Bar Maybe [a]
+instance Bar [] (a, a)
+instance Foo f => Bar (Either a) (f a)
+instance Foo ((,,) a b) => Bar ((,,) a b) (a, b, a)
+
+
+class Baz a where
+
+ baz :: a -> (forall a. a -> a) -> (b, forall c. c -> a) -> (b, c)
+ baz' :: b -> (forall b. b -> a) -> (forall b. b -> a) -> [(b, a)]
+ baz'' :: b -> (forall b. (forall b. b -> a) -> c) -> (forall c. c -> b)
+
+ baz = undefined
+ baz' = undefined
+ baz'' = undefined
+
+
+instance Baz (a -> b)
+instance Baz [c]
+instance Baz (a, b, c)
+instance Baz (a, [b], b, a)
+
+
+data Quux a b c = Qx a | Qux a b | Quux a b c
+
+instance Foo (Quux a b)
+instance Bar (Quux a c) (Quux a b c)
+instance Baz (Quux a b c)
+
+
+class Norf a b where
+
+ type Plugh a c b
+ data Thud a c
+
+ norf :: Plugh a c b -> a -> (a -> c) -> b
+
+ norf = undefined
+
+
+instance Norf Int Bool where
+
+ type Plugh Int [a] Bool = a
+ type Plugh Int (a, b) Bool = (a, [b])
+
+ data Thud Int (Quux a [a] c) = Thuud a | Thuuud Int Int
+ data Thud Int [a] = Thuuuud Bool
+
+
+instance Norf [a] [b] where
+
+ type Plugh [a] (Maybe a) [b] = a
+ type Plugh [a] [b] [b] = Quux a b (a, b)
+
+ data Thud [a] (a, a, a) = Thd a
diff --git a/html-test/src/Nesting.hs b/html-test/src/Nesting.hs
index 34177442..f88be87d 100644
--- a/html-test/src/Nesting.hs
+++ b/html-test/src/Nesting.hs
@@ -119,3 +119,18 @@ definition lists too.
-}
j :: t
j = undefined
+
+{-|
+ - list may start at arbitrary depth
+
+ - and consecutive items at that depth
+ belong to the same list
+
+ - of course we can still
+
+ * nest items like we are used to
+
+ - and then get back to initial list
+-}
+k :: t
+k = undefined
diff --git a/html-test/src/PromotedTypes.hs b/html-test/src/PromotedTypes.hs
new file mode 100644
index 00000000..ae3ad375
--- /dev/null
+++ b/html-test/src/PromotedTypes.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE TypeOperators #-}
+
+
+module PromotedTypes where
+
+
+data RevList a = RNil | RevList a :> a
+
+
+data Pattern :: [*] -> * where
+ Nil :: Pattern '[]
+ Cons :: Maybe h -> Pattern t -> Pattern (h ': t)
+
+
+-- Unlike (:), (:>) does not have to be quoted on type level.
+data RevPattern :: RevList * -> * where
+ RevNil :: RevPattern RNil
+ RevCons :: Maybe h -> RevPattern t -> RevPattern (t :> h)
+
+
+data Tuple :: (*, *) -> * where
+ Tuple :: a -> b -> Tuple '(a, b)
diff --git a/html-test/src/Threaded.hs b/html-test/src/Threaded.hs
new file mode 100644
index 00000000..7f3073ad
--- /dev/null
+++ b/html-test/src/Threaded.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+-- | Ensures haddock built with @-threaded@.
+module Threaded where
+
+import Threaded_TH
+
+-- | @$(forkTH)@ fails at compile time if haddock isn't using the
+-- threaded RTS.
+f = $(forkTH)
diff --git a/html-test/src/Threaded_TH.hs b/html-test/src/Threaded_TH.hs
new file mode 100644
index 00000000..53e5a399
--- /dev/null
+++ b/html-test/src/Threaded_TH.hs
@@ -0,0 +1,13 @@
+-- | Imported by 'Threaded', since a TH splice can't be used in the
+-- module where it is defined.
+module Threaded_TH where
+
+import Control.Concurrent (forkOS)
+import Language.Haskell.TH.Syntax (Exp (LitE), Lit (IntegerL), Q, runIO)
+
+-- | forkOS requires the threaded RTS, so this TH fails if haddock was
+-- built without @-threaded@.
+forkTH :: Q Exp
+forkTH = do
+ _ <- runIO (forkOS (return ()))
+ return (LitE (IntegerL 0))
diff --git a/html-test/src/Ticket253_1.hs b/html-test/src/Ticket253_1.hs
deleted file mode 100644
index 62ab4b17..00000000
--- a/html-test/src/Ticket253_1.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-module Ticket253_1 where
--- | See 'Ticket253_2.bar'.
---
--- Also see 'Ticket253_2.Baz'
-foo :: Int
-foo = 0
diff --git a/html-test/src/Ticket253_2.hs b/html-test/src/Ticket253_2.hs
deleted file mode 100644
index a19d4cee..00000000
--- a/html-test/src/Ticket253_2.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-module Ticket253_2 where
--- | Comment
-bar :: Int
-bar = 0
-
-data Baz = Baz
diff --git a/hypsrc-test/Utils.hs b/hypsrc-test/Utils.hs
new file mode 100644
index 00000000..e15fabee
--- /dev/null
+++ b/hypsrc-test/Utils.hs
@@ -0,0 +1,47 @@
+{-# LANGUAGE CPP #-}
+
+
+module Utils
+ ( baseDir, rootDir
+ , srcDir, refDir, outDir, refDir', outDir'
+ , haddockPath
+ , stripLocalAnchors, stripLocalLinks, stripLocalReferences
+ ) where
+
+
+import Data.List
+
+import System.FilePath
+
+
+baseDir, rootDir :: FilePath
+baseDir = takeDirectory __FILE__
+rootDir = baseDir </> ".."
+
+srcDir, refDir, outDir, refDir', outDir' :: FilePath
+srcDir = baseDir </> "src"
+refDir = baseDir </> "ref"
+outDir = baseDir </> "out"
+refDir' = refDir </> "src"
+outDir' = outDir </> "src"
+
+haddockPath :: FilePath
+haddockPath = rootDir </> "dist" </> "build" </> "haddock" </> "haddock"
+
+
+replaceBetween :: Eq a => [a] -> a -> [a] -> [a] -> [a]
+replaceBetween _ _ _ [] = []
+replaceBetween pref end val html@(x:xs') = case stripPrefix pref html of
+ Just strip -> pref ++ val ++ (replaceBetween' . dropWhile (/= end)) strip
+ Nothing -> x:(replaceBetween' xs')
+ where
+ replaceBetween' = replaceBetween pref end val
+
+stripLocalAnchors :: String -> String
+stripLocalAnchors = replaceBetween "<a name=\"local-" '\"' "0"
+
+stripLocalLinks :: String -> String
+stripLocalLinks = replaceBetween "<a href=\"#local-" '\"' "0"
+
+stripLocalReferences :: String -> String
+stripLocalReferences = stripLocalLinks . stripLocalAnchors
diff --git a/hypsrc-test/accept.hs b/hypsrc-test/accept.hs
new file mode 100755
index 00000000..4606b2df
--- /dev/null
+++ b/hypsrc-test/accept.hs
@@ -0,0 +1,27 @@
+#!/usr/bin/env runhaskell
+{-# LANGUAGE CPP #-}
+
+
+import System.Directory
+import System.FilePath
+import System.Environment
+
+import Utils
+
+
+main :: IO ()
+main = do
+ args <- getArgs
+ files <- filter isHtmlFile <$> getDirectoryContents outDir'
+ let files' = if args == ["--all"] || args == ["-a"]
+ then files
+ else filter ((`elem` args) . takeBaseName) files
+ mapM_ copy files'
+ where
+ isHtmlFile = (== ".html") . takeExtension
+
+
+copy :: FilePath -> IO ()
+copy file = do
+ content <- stripLocalReferences <$> readFile (outDir' </> file)
+ writeFile (refDir' </> file) content
diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html
new file mode 100644
index 00000000..74a7a427
--- /dev/null
+++ b/hypsrc-test/ref/src/Classes.html
@@ -0,0 +1,1065 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Classes</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span class="hs-keyword"
+ >class</span
+ ><span
+ > </span
+ ><a name="Foo"
+ ><a href="Classes.html#Foo"
+ ><span class="hs-identifier"
+ >Foo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><span
+ > </span
+ ><a name="bar"
+ ><a href="Classes.html#bar"
+ ><span class="hs-identifier"
+ >bar</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><span
+ > </span
+ ><a name="baz"
+ ><a href="Classes.html#baz"
+ ><span class="hs-identifier"
+ >baz</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Classes.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#bar"
+ ><span class="hs-identifier"
+ >bar</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >id</span
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#baz"
+ ><span class="hs-identifier"
+ >baz</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Classes.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#bar"
+ ><span class="hs-identifier"
+ >bar</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >length</span
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#baz"
+ ><span class="hs-identifier"
+ >baz</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><span class="hs-keyword"
+ >class</span
+ ><span
+ > </span
+ ><a href="Classes.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><a name="Foo%27"
+ ><a href="Classes.html#Foo%27"
+ ><span class="hs-identifier"
+ >Foo'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ><span
+ > </span
+ ><a name="quux"
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier"
+ >quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-19"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier"
+ >quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier hs-var"
+ >norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-20"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-21"
+ ></a
+ ><span
+ > </span
+ ><a name="norf"
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier"
+ >norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-22"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier"
+ >norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><a href="Classes.html#baz"
+ ><span class="hs-identifier hs-var"
+ >baz</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >sum</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >map</span
+ ><span
+ > </span
+ ><a href="Classes.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-23"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-24"
+ ></a
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Classes.html#Foo%27"
+ ><span class="hs-identifier hs-type"
+ >Foo'</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-25"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#norf"
+ ><span class="hs-identifier"
+ >norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >sum</span
+ ><span
+ >
+</span
+ ><a name="line-26"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-27"
+ ></a
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Classes.html#Foo%27"
+ ><span class="hs-identifier hs-type"
+ >Foo'</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-28"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#quux"
+ ><span class="hs-identifier"
+ >quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >uncurry</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator hs-var"
+ >++</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-29"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-30"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-31"
+ ></a
+ ><span class="hs-keyword"
+ >class</span
+ ><span
+ > </span
+ ><a name="Plugh"
+ ><a href="Classes.html#Plugh"
+ ><span class="hs-identifier"
+ >Plugh</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >p</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-32"
+ ></a
+ ><span
+ > </span
+ ><a name="plugh"
+ ><a href="Classes.html#plugh"
+ ><span class="hs-identifier"
+ >plugh</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-33"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-34"
+ ></a
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Classes.html#Plugh"
+ ><span class="hs-identifier hs-type"
+ >Plugh</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Either</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-35"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="Classes.html#plugh"
+ ><span class="hs-identifier"
+ >plugh</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-identifier hs-var"
+ >Left</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >Right</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-36"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >plugh</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-identifier hs-var"
+ >Right</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >Right</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-37"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >plugh</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-identifier hs-var"
+ >Left</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >Left</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-38"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >plugh</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-identifier hs-var"
+ >Right</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >Left</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-39"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/ref/src/Constructors.html b/hypsrc-test/ref/src/Constructors.html
new file mode 100644
index 00000000..86a482f6
--- /dev/null
+++ b/hypsrc-test/ref/src/Constructors.html
@@ -0,0 +1,940 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Constructors</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span class="hs-keyword"
+ >data</span
+ ><span
+ > </span
+ ><a name="Foo"
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier"
+ >Foo</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="Bar"
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier"
+ >Bar</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><a name="Baz"
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier"
+ >Baz</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><a name="Quux"
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier"
+ >Quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span class="hs-keyword"
+ >newtype</span
+ ><span
+ > </span
+ ><a name="Norf"
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier"
+ >Norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="Norf"
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier"
+ >Norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span class="hs-identifier"
+ >bar</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >baz</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >quux</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><a name="bar"
+ ><a href="Constructors.html#bar"
+ ><span class="hs-identifier"
+ >bar</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><a name="baz"
+ ><a href="Constructors.html#baz"
+ ><span class="hs-identifier"
+ >baz</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><a name="quux"
+ ><a href="Constructors.html#quux"
+ ><span class="hs-identifier"
+ >quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="Constructors.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ><span class="hs-identifier"
+ >unfoo</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-19"
+ ></a
+ ><a name="unfoo"
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier"
+ >unfoo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-20"
+ ></a
+ ><span class="hs-identifier"
+ >unfoo</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-21"
+ ></a
+ ><span class="hs-identifier"
+ >unfoo</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >foo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >n</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >42</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >n</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-22"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-23"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-24"
+ ></a
+ ><span class="hs-identifier"
+ >unnorf</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="Constructors.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-25"
+ ></a
+ ><a name="unnorf"
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier"
+ >unnorf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >xs</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >xs</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-26"
+ ></a
+ ><span class="hs-identifier"
+ >unnorf</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >xs</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >reverse</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >xs</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-27"
+ ></a
+ ><span class="hs-identifier"
+ >unnorf</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >undefined</span
+ ><span
+ >
+</span
+ ><a name="line-28"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-29"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-30"
+ ></a
+ ><span class="hs-identifier"
+ >unnorf'</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-31"
+ ></a
+ ><a name="unnorf%27"
+ ><a href="Constructors.html#unnorf%27"
+ ><span class="hs-identifier"
+ >unnorf'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span class="hs-glyph"
+ >@</span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Norf"
+ ><span class="hs-identifier hs-var"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >f1</span
+ ></a
+ ></a
+ ><span class="hs-glyph"
+ >@</span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >n</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >f2</span
+ ></a
+ ></a
+ ><span class="hs-glyph"
+ >@</span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Constructors.html#Quux"
+ ><span class="hs-identifier hs-var"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >f3</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >_</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ >
+</span
+ ><a name="line-32"
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x'</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >n</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >f1</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >aux</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >f3</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-33"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-34"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >aux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >fx</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >f2</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >fx</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >f3</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-35"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >sum</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >map</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unfoo"
+ ><span class="hs-identifier hs-var"
+ >unfoo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><a href="Constructors.html#unnorf"
+ ><span class="hs-identifier hs-var"
+ >unnorf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-36"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/ref/src/Identifiers.html b/hypsrc-test/ref/src/Identifiers.html
new file mode 100644
index 00000000..7680b3ef
--- /dev/null
+++ b/hypsrc-test/ref/src/Identifiers.html
@@ -0,0 +1,935 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Identifiers</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span class="hs-identifier"
+ >foo</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >bar</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >baz</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><a name="foo"
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier"
+ >foo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><a name="bar"
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier"
+ >bar</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#baz"
+ ><span class="hs-identifier hs-var"
+ >baz</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><a name="baz"
+ ><a href="Identifiers.html#baz"
+ ><span class="hs-identifier"
+ >baz</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span class="hs-identifier"
+ >quux</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><a name="quux"
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier"
+ >quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Identifiers.html#bar"
+ ><span class="hs-identifier hs-var"
+ >bar</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span class="hs-identifier"
+ >norf</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><a name="norf"
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier"
+ >norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >z</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >&lt;</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >&lt;</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >&lt;</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >otherwise</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier hs-var"
+ >norf</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-glyph"
+ >-</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-glyph"
+ >-</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-glyph"
+ >-</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-19"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-20"
+ ></a
+ ><span class="hs-identifier"
+ >main</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >IO</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-21"
+ ></a
+ ><a name="main"
+ ><a href="Identifiers.html#main"
+ ><span class="hs-identifier"
+ >main</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >do</span
+ ><span
+ >
+</span
+ ><a name="line-22"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >putStrLn</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >show</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#foo"
+ ><span class="hs-identifier hs-var"
+ >foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-23"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >putStrLn</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >show</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#quux"
+ ><span class="hs-identifier hs-var"
+ >quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-24"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >putStrLn</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >show</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><a href="Identifiers.html#norf"
+ ><span class="hs-identifier hs-var"
+ >Identifiers</span
+ ><span class="hs-operator hs-var"
+ >.</span
+ ><span class="hs-identifier hs-var"
+ >norf</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >z</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-25"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-26"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >10</span
+ ><span
+ >
+</span
+ ><a name="line-27"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >20</span
+ ><span
+ >
+</span
+ ><a name="line-28"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >z</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >30</span
+ ><span
+ >
+</span
+ ><a name="line-29"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/ref/src/Literals.html b/hypsrc-test/ref/src/Literals.html
new file mode 100644
index 00000000..a009a502
--- /dev/null
+++ b/hypsrc-test/ref/src/Literals.html
@@ -0,0 +1,428 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Literals</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span class="hs-identifier"
+ >str</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >String</span
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><a name="str"
+ ><a href="Literals.html#str"
+ ><span class="hs-identifier"
+ >str</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-string"
+ >&quot;str literal&quot;</span
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><span class="hs-identifier"
+ >num</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Num</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><a name="num"
+ ><a href="Literals.html#num"
+ ><span class="hs-identifier"
+ >num</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >1</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >1010011</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >41231</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >12131</span
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><span class="hs-identifier"
+ >frac</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Fractional</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><a name="frac"
+ ><a href="Literals.html#frac"
+ ><span class="hs-identifier"
+ >frac</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >42.0000001</span
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><span class="hs-identifier"
+ >list</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><a name="list"
+ ><a href="Literals.html#list"
+ ><span class="hs-identifier"
+ >list</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span class="hs-identifier"
+ >pair</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><a name="pair"
+ ><a href="Literals.html#pair"
+ ><span class="hs-identifier"
+ >pair</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/ref/src/Operators.html b/hypsrc-test/ref/src/Operators.html
new file mode 100644
index 00000000..fe690db2
--- /dev/null
+++ b/hypsrc-test/ref/src/Operators.html
@@ -0,0 +1,837 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Operators</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >+++</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="%2B%2B%2B"
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator"
+ >+++</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >++</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >++</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >$$$</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="%24%24%24"
+ ><a href="Operators.html#%24%24%24"
+ ><span class="hs-operator"
+ >$$$</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span
+ > </span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var"
+ >+++</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >***</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><a name="%2A%2A%2A"
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator"
+ >***</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >***</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-identifier"
+ >_</span
+ ><span class="hs-glyph"
+ >:</span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var"
+ >+++</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-var"
+ >***</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >*/\*</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="%2A%2F%5C%2A"
+ ><a href="Operators.html#%2A%2F%5C%2A"
+ ><span class="hs-operator"
+ >*/\*</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >concatMap</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Operators.html#%2A%2A%2A"
+ ><span class="hs-operator hs-var"
+ >***</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >**/\**</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span class="hs-special"
+ >]</span
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="%2A%2A%2F%5C%2A%2A"
+ ><a href="Operators.html#%2A%2A%2F%5C%2A%2A"
+ ><span class="hs-operator"
+ >**/\**</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >zipWith</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Operators.html#%2A%2F%5C%2A"
+ ><span class="hs-operator hs-var"
+ >*/\*</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >[</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><a href="Operators.html#%2B%2B%2B"
+ ><span class="hs-operator hs-var"
+ >+++</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >]</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><a href="Operators.html#%24%24%24"
+ ><span class="hs-operator hs-var"
+ >$$$</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-19"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-20"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-21"
+ ></a
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-operator"
+ >#.#</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >c</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-type"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-22"
+ ></a
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="%23.%23"
+ ><a href="Operators.html#%23.%23"
+ ><span class="hs-operator"
+ >#.#</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-var"
+ >const</span
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >$</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >a</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >b</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-23"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/ref/src/Records.html b/hypsrc-test/ref/src/Records.html
new file mode 100644
index 00000000..eb4e0fbb
--- /dev/null
+++ b/hypsrc-test/ref/src/Records.html
@@ -0,0 +1,993 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-pragma"
+ >{-# LANGUAGE NamedFieldPuns #-}</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span class="hs-pragma"
+ >{-# LANGUAGE RecordWildCards #-}</span
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Records</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><span class="hs-keyword"
+ >data</span
+ ><span
+ > </span
+ ><a name="Point"
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier"
+ >Point</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="Point"
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier"
+ >Point</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a name="x"
+ ><a href="Records.html#x"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >!</span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a name="y"
+ ><a href="Records.html#y"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >!</span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><span class="hs-identifier"
+ >point</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><a name="point"
+ ><a href="Records.html#point"
+ ><span class="hs-identifier"
+ >point</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-var"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ><span class="hs-identifier"
+ >lengthSqr</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-19"
+ ></a
+ ><a name="lengthSqr"
+ ><a href="Records.html#lengthSqr"
+ ><span class="hs-identifier"
+ >lengthSqr</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-var"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-20"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-21"
+ ></a
+ ><span class="hs-identifier"
+ >lengthSqr'</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-22"
+ ></a
+ ><a name="lengthSqr%27"
+ ><a href="Records.html#lengthSqr%27"
+ ><span class="hs-identifier"
+ >lengthSqr'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-var"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >*</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-23"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-24"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-25"
+ ></a
+ ><span class="hs-identifier"
+ >translateX</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >translateY</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-26"
+ ></a
+ ><a name="translateX"
+ ><a href="Records.html#translateX"
+ ><span class="hs-identifier"
+ >translateX</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >p</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >d</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >d</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span
+ >
+</span
+ ><a name="line-27"
+ ></a
+ ><a name="translateY"
+ ><a href="Records.html#translateY"
+ ><span class="hs-identifier"
+ >translateY</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >p</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >d</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >d</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span
+ >
+</span
+ ><a name="line-28"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-29"
+ ></a
+ ><span class="hs-identifier"
+ >translate</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-type"
+ >Point</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-30"
+ ></a
+ ><a name="translate"
+ ><a href="Records.html#translate"
+ ><span class="hs-identifier"
+ >translate</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >x</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >y</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >p</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ >
+</span
+ ><a name="line-31"
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >aux</span
+ ></a
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-32"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-33"
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >dx</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >dy</span
+ ></a
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-34"
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >aux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a href="Records.html#Point"
+ ><span class="hs-identifier hs-var"
+ >Point</span
+ ></a
+ ><span class="hs-special"
+ >{</span
+ ><span class="hs-glyph"
+ >..</span
+ ><span class="hs-special"
+ >}</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >p</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >{</span
+ ><span
+ > </span
+ ><a href="Records.html#x"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >x</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >dx</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Records.html#y"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >y</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-operator hs-var"
+ >+</span
+ ><span
+ > </span
+ ><a href="#local-0"
+ ><span class="hs-identifier hs-var"
+ >dy</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >}</span
+ ><span
+ >
+</span
+ ><a name="line-35"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/ref/src/Types.html b/hypsrc-test/ref/src/Types.html
new file mode 100644
index 00000000..d59f61f8
--- /dev/null
+++ b/hypsrc-test/ref/src/Types.html
@@ -0,0 +1,1057 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+ ><link rel="stylesheet" type="text/css" href="style.css"
+ /><script type="text/javascript" src="highlight.js"
+ ></script
+ ></head
+ ><body
+ ><pre
+ ><span class="hs-pragma"
+ >{-# LANGUAGE TypeFamilies #-}</span
+ ><span
+ >
+</span
+ ><a name="line-2"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-3"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-4"
+ ></a
+ ><span class="hs-keyword"
+ >module</span
+ ><span
+ > </span
+ ><span class="hs-identifier"
+ >Types</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >where</span
+ ><span
+ >
+</span
+ ><a name="line-5"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-6"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-7"
+ ></a
+ ><span class="hs-keyword"
+ >data</span
+ ><span
+ > </span
+ ><a name="Quux"
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier"
+ >Quux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="Bar"
+ ><a href="Types.html#Bar"
+ ><span class="hs-identifier"
+ >Bar</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >|</span
+ ><span
+ > </span
+ ><a name="Baz"
+ ><a href="Types.html#Baz"
+ ><span class="hs-identifier"
+ >Baz</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-8"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-9"
+ ></a
+ ><span class="hs-keyword"
+ >newtype</span
+ ><span
+ > </span
+ ><a name="Foo"
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier"
+ >Foo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="Foo"
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier"
+ >Foo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-10"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-11"
+ ></a
+ ><span class="hs-keyword"
+ >type</span
+ ><span
+ > </span
+ ><a name="FooQuux"
+ ><a href="Types.html#FooQuux"
+ ><span class="hs-identifier"
+ >FooQuux</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-12"
+ ></a
+ ><span class="hs-keyword"
+ >type</span
+ ><span
+ > </span
+ ><a name="QuuxFoo"
+ ><a href="Types.html#QuuxFoo"
+ ><span class="hs-identifier"
+ >QuuxFoo</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-13"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-14"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-15"
+ ></a
+ ><span class="hs-keyword"
+ >data</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >family</span
+ ><span
+ > </span
+ ><a name="Norf"
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier"
+ >Norf</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-16"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-17"
+ ></a
+ ><span class="hs-keyword"
+ >data</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="NFQ"
+ ><a href="Types.html#NFQ"
+ ><span class="hs-identifier"
+ >NFQ</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-18"
+ ></a
+ ><span class="hs-keyword"
+ >data</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><a name="NQF"
+ ><a href="Types.html#NQF"
+ ><span class="hs-identifier"
+ >NQF</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-19"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-20"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-21"
+ ></a
+ ><span class="hs-keyword"
+ >type</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >family</span
+ ><span
+ > </span
+ ><a name="Norf%27"
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier"
+ >Norf'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >a</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><a name="local-0"
+ ><a href="#local-0"
+ ><span class="hs-identifier"
+ >b</span
+ ></a
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-22"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-23"
+ ></a
+ ><span class="hs-keyword"
+ >type</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-type"
+ >Norf'</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-24"
+ ></a
+ ><span class="hs-keyword"
+ >type</span
+ ><span
+ > </span
+ ><span class="hs-keyword"
+ >instance</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-type"
+ >Norf'</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ >
+</span
+ ><a name="line-25"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-26"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-27"
+ ></a
+ ><span class="hs-identifier"
+ >norf1</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-28"
+ ></a
+ ><a name="norf1"
+ ><a href="Types.html#norf1"
+ ><span class="hs-identifier"
+ >norf1</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#NFQ"
+ ><span class="hs-identifier hs-var"
+ >NFQ</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><a href="Types.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-29"
+ ></a
+ ><span class="hs-identifier"
+ >norf1</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#NFQ"
+ ><span class="hs-identifier hs-var"
+ >NFQ</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><a href="Types.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >1</span
+ ><span
+ >
+</span
+ ><a name="line-30"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-31"
+ ></a
+ ><span class="hs-identifier"
+ >norf2</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf"
+ ><span class="hs-identifier hs-type"
+ >Norf</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-32"
+ ></a
+ ><a name="norf2"
+ ><a href="Types.html#norf2"
+ ><span class="hs-identifier"
+ >norf2</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#NQF"
+ ><span class="hs-identifier hs-var"
+ >NQF</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-33"
+ ></a
+ ><span class="hs-identifier"
+ >norf2</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#NQF"
+ ><span class="hs-identifier hs-var"
+ >NQF</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >1</span
+ ><span
+ >
+</span
+ ><a name="line-34"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-35"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-36"
+ ></a
+ ><span class="hs-identifier"
+ >norf1'</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-type"
+ >Norf'</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-37"
+ ></a
+ ><a name="norf1%27"
+ ><a href="Types.html#norf1%27"
+ ><span class="hs-identifier"
+ >norf1'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-38"
+ ></a
+ ><span class="hs-identifier"
+ >norf1'</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >1</span
+ ><span
+ >
+</span
+ ><a name="line-39"
+ ></a
+ ><span
+ >
+</span
+ ><a name="line-40"
+ ></a
+ ><span class="hs-identifier"
+ >norf2'</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >::</span
+ ><span
+ > </span
+ ><a href="Types.html#Norf%27"
+ ><span class="hs-identifier hs-type"
+ >Norf'</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Quux"
+ ><span class="hs-identifier hs-type"
+ >Quux</span
+ ></a
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-type"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >-&gt;</span
+ ><span
+ > </span
+ ><span class="hs-identifier hs-type"
+ >Int</span
+ ><span
+ >
+</span
+ ><a name="line-41"
+ ></a
+ ><a name="norf2%27"
+ ><a href="Types.html#norf2%27"
+ ><span class="hs-identifier"
+ >norf2'</span
+ ></a
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Bar"
+ ><span class="hs-identifier hs-var"
+ >Bar</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >0</span
+ ><span
+ >
+</span
+ ><a name="line-42"
+ ></a
+ ><span class="hs-identifier"
+ >norf2'</span
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><a href="Types.html#Baz"
+ ><span class="hs-identifier hs-var"
+ >Baz</span
+ ></a
+ ><span class="hs-special"
+ >,</span
+ ><span
+ > </span
+ ><a href="Types.html#Foo"
+ ><span class="hs-identifier hs-var"
+ >Foo</span
+ ></a
+ ><span
+ > </span
+ ><span class="hs-special"
+ >(</span
+ ><span class="hs-special"
+ >)</span
+ ><span class="hs-special"
+ >)</span
+ ><span
+ > </span
+ ><span class="hs-glyph"
+ >=</span
+ ><span
+ > </span
+ ><span class="hs-number"
+ >1</span
+ ><span
+ >
+</span
+ ><a name="line-43"
+ ></a
+ ></pre
+ ></body
+ ></html
+>
diff --git a/hypsrc-test/run.hs b/hypsrc-test/run.hs
new file mode 100755
index 00000000..853c4f09
--- /dev/null
+++ b/hypsrc-test/run.hs
@@ -0,0 +1,122 @@
+#!/usr/bin/env runhaskell
+{-# LANGUAGE CPP #-}
+
+
+import Control.Monad
+
+import Data.List
+import Data.Maybe
+
+import System.Directory
+import System.Environment
+import System.Exit
+import System.FilePath
+import System.Process
+
+import Distribution.Verbosity
+import Distribution.Simple.Utils hiding (die)
+
+import Utils
+
+
+main :: IO ()
+main = do
+ haddockAvailable <- doesFileExist haddockPath
+ unless haddockAvailable $ die "Haddock exectuable not available"
+
+ (args, mods) <- partition ("-" `isPrefixOf`) <$> getArgs
+ let args' = filter (\arg -> not $ arg == "--all" || arg == "-a") args
+ mods' <- map (srcDir </>) <$> case args of
+ [] -> getAllSrcModules
+ _ -> return $ map (++ ".hs") mods
+
+ putHaddockVersion
+ putGhcVersion
+
+ putStrLn "Running tests..."
+ runHaddock $
+ [ "--odir=" ++ outDir
+ , "--no-warnings"
+ , "--hyperlinked-source"
+ , "--pretty-html"
+ ] ++ args' ++ mods'
+
+ forM_ mods' $ check True
+
+
+check :: Bool -> FilePath -> IO ()
+check strict mdl = do
+ hasReference <- doesFileExist refFile
+ if hasReference
+ then do
+ ref <- readFile refFile
+ out <- readFile outFile
+ compareOutput strict mdl ref out
+ else do
+ putStrLn $ "Pass: " ++ mdl ++ " (no reference file)"
+ where
+ refFile = refDir' </> takeBaseName mdl ++ ".html"
+ outFile = outDir' </> takeBaseName mdl ++ ".html"
+
+
+compareOutput :: Bool -> FilePath -> String -> String -> IO ()
+compareOutput strict mdl ref out = do
+ if ref' == out'
+ then putStrLn $ "Pass: " ++ mdl
+ else do
+ putStrLn $ "Fail: " ++ mdl
+ diff mdl ref' out'
+ when strict $ die "Aborting further tests."
+ where
+ ref' = stripLocalReferences ref
+ out' = stripLocalReferences out
+
+
+diff :: FilePath -> String -> String -> IO ()
+diff mdl ref out = do
+ colorDiffPath <- findProgramLocation silent "colordiff"
+ let cmd = fromMaybe "diff" colorDiffPath
+
+ writeFile refFile ref
+ writeFile outFile out
+
+ result <- system $ cmd ++ " " ++ refFile ++ " " ++ outFile
+ unless (result == ExitSuccess) $ die "Failed to run `diff` command."
+ where
+ refFile = outDir </> takeBaseName mdl ++ ".ref.nolinks"
+ outFile = outDir </> takeBaseName mdl ++ ".nolinks"
+
+
+
+getAllSrcModules :: IO [FilePath]
+getAllSrcModules =
+ filter isHaskellFile <$> getDirectoryContents srcDir
+ where
+ isHaskellFile = (== ".hs") . takeExtension
+
+
+putHaddockVersion :: IO ()
+putHaddockVersion = do
+ putStrLn "Haddock version:"
+ runHaddock ["--version"]
+ putStrLn ""
+
+
+putGhcVersion :: IO ()
+putGhcVersion = do
+ putStrLn "GHC version:"
+ runHaddock ["--ghc-version"]
+ putStrLn ""
+
+
+runHaddock :: [String] -> IO ()
+runHaddock args = do
+ menv <- Just <$> getEnvironment
+ handle <- runProcess haddockPath args Nothing menv Nothing Nothing Nothing
+ waitForSuccess handle $ "Failed to invoke haddock with " ++ show args
+
+
+waitForSuccess :: ProcessHandle -> String -> IO ()
+waitForSuccess handle msg = do
+ result <- waitForProcess handle
+ unless (result == ExitSuccess) $ die msg
diff --git a/hypsrc-test/src/Classes.hs b/hypsrc-test/src/Classes.hs
new file mode 100644
index 00000000..b3c3f785
--- /dev/null
+++ b/hypsrc-test/src/Classes.hs
@@ -0,0 +1,38 @@
+module Classes where
+
+
+class Foo a where
+ bar :: a -> Int
+ baz :: Int -> (a, a)
+
+instance Foo Int where
+ bar = id
+ baz x = (x, x)
+
+instance Foo [a] where
+ bar = length
+ baz _ = ([], [])
+
+
+class Foo a => Foo' a where
+ quux :: (a, a) -> a
+ quux (x, y) = norf [x, y]
+
+ norf :: [a] -> a
+ norf = quux . baz . sum . map bar
+
+instance Foo' Int where
+ norf = sum
+
+instance Foo' [a] where
+ quux = uncurry (++)
+
+
+class Plugh p where
+ plugh :: p a a -> p b b -> p (a -> b) (b -> a)
+
+instance Plugh Either where
+ plugh (Left a) _ = Right $ const a
+ plugh (Right a) _ = Right $ const a
+ plugh _ (Left b) = Left $ const b
+ plugh _ (Right b) = Left $ const b
diff --git a/hypsrc-test/src/Constructors.hs b/hypsrc-test/src/Constructors.hs
new file mode 100644
index 00000000..8cb46535
--- /dev/null
+++ b/hypsrc-test/src/Constructors.hs
@@ -0,0 +1,35 @@
+module Constructors where
+
+
+data Foo
+ = Bar
+ | Baz
+ | Quux Foo Int
+
+newtype Norf = Norf (Foo, [Foo], Foo)
+
+
+bar, baz, quux :: Foo
+bar = Bar
+baz = Baz
+quux = Quux quux 0
+
+
+unfoo :: Foo -> Int
+unfoo Bar = 0
+unfoo Baz = 0
+unfoo (Quux foo n) = 42 * n + unfoo foo
+
+
+unnorf :: Norf -> [Foo]
+unnorf (Norf (Bar, xs, Bar)) = xs
+unnorf (Norf (Baz, xs, Baz)) = reverse xs
+unnorf _ = undefined
+
+
+unnorf' :: Norf -> Int
+unnorf' x@(Norf (f1@(Quux _ n), _, f2@(Quux f3 _))) =
+ x' + n * unfoo f1 + aux f3
+ where
+ aux fx = unfoo f2 * unfoo fx * unfoo f3
+ x' = sum . map unfoo . unnorf $ x
diff --git a/hypsrc-test/src/Identifiers.hs b/hypsrc-test/src/Identifiers.hs
new file mode 100644
index 00000000..173c3ba7
--- /dev/null
+++ b/hypsrc-test/src/Identifiers.hs
@@ -0,0 +1,28 @@
+module Identifiers where
+
+
+foo, bar, baz :: Int -> Int -> Int
+foo x y = x + x * bar y x * y + y
+bar x y = y + x - baz x y - x + y
+baz x y = x * y * y * y * x
+
+quux :: Int -> Int
+quux x = foo (bar x x) (bar x x)
+
+norf :: Int -> Int -> Int -> Int
+norf x y z
+ | x < 0 = quux x
+ | y < 0 = quux y
+ | z < 0 = quux z
+ | otherwise = norf (-x) (-y) (-z)
+
+
+main :: IO ()
+main = do
+ putStrLn . show $ foo x y
+ putStrLn . show $ quux z
+ putStrLn . show $ Identifiers.norf x y z
+ where
+ x = 10
+ y = 20
+ z = 30
diff --git a/hypsrc-test/src/Literals.hs b/hypsrc-test/src/Literals.hs
new file mode 100644
index 00000000..997b6615
--- /dev/null
+++ b/hypsrc-test/src/Literals.hs
@@ -0,0 +1,17 @@
+module Literals where
+
+
+str :: String
+str = "str literal"
+
+num :: Num a => a
+num = 0 + 1 + 1010011 * 41231 + 12131
+
+frac :: Fractional a => a
+frac = 42.0000001
+
+list :: [[[[a]]]]
+list = [[], [[]], [[[]]]]
+
+pair :: ((), ((), (), ()), ())
+pair = ((), ((), (), ()), ())
diff --git a/hypsrc-test/src/Operators.hs b/hypsrc-test/src/Operators.hs
new file mode 100644
index 00000000..8e86ab0b
--- /dev/null
+++ b/hypsrc-test/src/Operators.hs
@@ -0,0 +1,22 @@
+module Operators where
+
+
+(+++) :: [a] -> [a] -> [a]
+a +++ b = a ++ b ++ a
+
+($$$) :: [a] -> [a] -> [a]
+a $$$ b = b +++ a
+
+(***) :: [a] -> [a] -> [a]
+(***) a [] = a
+(***) a (_:b) = a +++ (a *** b)
+
+(*/\*) :: [[a]] -> [a] -> [a]
+a */\* b = concatMap (*** b) a
+
+(**/\**) :: [[a]] -> [[a]] -> [[a]]
+a **/\** b = zipWith (*/\*) [a +++ b] (a $$$ b)
+
+
+(#.#) :: a -> b -> (c -> (a, b))
+a #.# b = const $ (a, b)
diff --git a/hypsrc-test/src/Polymorphism.hs b/hypsrc-test/src/Polymorphism.hs
new file mode 100644
index 00000000..a74ac492
--- /dev/null
+++ b/hypsrc-test/src/Polymorphism.hs
@@ -0,0 +1,66 @@
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+
+module Polymorphism where
+
+
+foo :: a -> a -> a
+foo = undefined
+
+foo' :: forall a. a -> a -> a
+foo' = undefined
+
+bar :: a -> b -> (a, b)
+bar = undefined
+
+bar' :: forall a b. a -> b -> (a, b)
+bar' = undefined
+
+baz :: a -> (a -> [a -> a] -> b) -> b
+baz = undefined
+
+baz' :: forall a b. a -> (a -> [a -> a] -> b) -> b
+baz' = undefined
+
+quux :: a -> (forall a. a -> a) -> a
+quux = undefined
+
+quux' :: forall a. a -> (forall a. a -> a) -> a
+quux' = undefined
+
+
+num :: Num a => a -> a -> a
+num = undefined
+
+num' :: forall a. Num a => a -> a -> a
+num' = undefined
+
+eq :: (Eq a, Eq b) => [a] -> [b] -> (a, b)
+eq = undefined
+
+eq' :: forall a b. (Eq a, Eq b) => [a] -> [b] -> (a, b)
+eq' = undefined
+
+mon :: Monad m => (a -> m a) -> m a
+mon = undefined
+
+mon' :: forall m a. Monad m => (a -> m a) -> m a
+mon' = undefined
+
+
+norf :: a -> (forall a. Ord a => a -> a) -> a
+norf = undefined
+
+norf' :: forall a. a -> (forall a. Ord a => a -> a) -> a
+norf' = undefined
+
+
+plugh :: forall a. a -> a
+plugh x = x :: a
+
+thud :: forall a b. (a -> b) -> a -> (a, b)
+thud f x =
+ (x :: a, y) :: (a, b)
+ where
+ y = (f :: a -> b) x :: b
diff --git a/hypsrc-test/src/Records.hs b/hypsrc-test/src/Records.hs
new file mode 100644
index 00000000..40a01121
--- /dev/null
+++ b/hypsrc-test/src/Records.hs
@@ -0,0 +1,34 @@
+{-# LANGUAGE NamedFieldPuns #-}
+{-# LANGUAGE RecordWildCards #-}
+
+
+module Records where
+
+
+data Point = Point
+ { x :: !Int
+ , y :: !Int
+ }
+
+
+point :: Int -> Int -> Point
+point x y = Point { x = x, y = y }
+
+
+lengthSqr :: Point -> Int
+lengthSqr (Point { x = x, y = y }) = x * x + y * y
+
+lengthSqr' :: Point -> Int
+lengthSqr' (Point { x, y }) = y * y + x * x
+
+
+translateX, translateY :: Point -> Int -> Point
+translateX p d = p { x = x p + d }
+translateY p d = p { y = y p + d }
+
+translate :: Int -> Int -> Point -> Point
+translate x y p =
+ aux p
+ where
+ (dx, dy) = (x, y)
+ aux Point{..} = p { x = x + dx, y = y + dy }
diff --git a/hypsrc-test/src/Types.hs b/hypsrc-test/src/Types.hs
new file mode 100644
index 00000000..b63a825b
--- /dev/null
+++ b/hypsrc-test/src/Types.hs
@@ -0,0 +1,42 @@
+{-# LANGUAGE TypeFamilies #-}
+
+
+module Types where
+
+
+data Quux = Bar | Baz
+
+newtype Foo = Foo ()
+
+type FooQuux = (Foo, Quux)
+type QuuxFoo = (Quux, Foo)
+
+
+data family Norf a b
+
+data instance Norf Foo Quux = NFQ Foo Quux
+data instance Norf Quux Foo = NQF Quux Foo
+
+
+type family Norf' a b
+
+type instance Norf' Foo Quux = (Foo, Quux)
+type instance Norf' Quux Foo = (Quux, Foo)
+
+
+norf1 :: Norf Foo Quux -> Int
+norf1 (NFQ (Foo ()) Bar) = 0
+norf1 (NFQ (Foo ()) Baz) = 1
+
+norf2 :: Norf Quux Foo -> Int
+norf2 (NQF Bar (Foo ())) = 0
+norf2 (NQF Baz (Foo ())) = 1
+
+
+norf1' :: Norf' Foo Quux -> Int
+norf1' (Foo (), Bar) = 0
+norf1' (Foo (), Baz) = 1
+
+norf2' :: Norf' Quux Foo -> Int
+norf2' (Bar, Foo ()) = 0
+norf2' (Baz, Foo ()) = 1
diff --git a/latex-test/run.lhs b/latex-test/run.lhs
index c1d48d97..d3e39e90 100755
--- a/latex-test/run.lhs
+++ b/latex-test/run.lhs
@@ -6,7 +6,7 @@ import Control.Monad
import Control.Applicative
import Data.List
import Data.Maybe
-import Distribution.InstalledPackageInfo
+import Distribution.InstalledPackageInfo hiding (dataDir)
import Distribution.Package (PackageName (..))
import Distribution.Simple.Compiler
import Distribution.Simple.GHC