diff options
author | Simon Hengel <sol@typeful.net> | 2012-10-15 10:34:28 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-10-15 15:46:18 +0200 |
commit | 958d64d77572c47d249965d7146ac17a23de806d (patch) | |
tree | b3cf49a9c6202b50d618df9270e24d28f5ecae50 /html-test/tests | |
parent | 943c5b7880cbfa8c90a0776dd539ae1e89f46d35 (diff) |
Move HTML tests to directory /html-test/
Diffstat (limited to 'html-test/tests')
163 files changed, 12628 insertions, 0 deletions
diff --git a/html-test/tests/A.hs b/html-test/tests/A.hs new file mode 100644 index 00000000..606b0865 --- /dev/null +++ b/html-test/tests/A.hs @@ -0,0 +1,17 @@ +module A where + +data A = A + +other :: Int +other = 2 + +-- | Doc for test2 +test2 :: Bool +test2 = False + +-- | Should show up on the page for both modules A and B +data X = X -- ^ Doc for consructor + +-- | Should show up on the page for both modules A and B +reExport :: Int +reExport = 1 diff --git a/html-test/tests/A.html.ref b/html-test/tests/A.html.ref new file mode 100644 index 00000000..328fec02 --- /dev/null +++ b/html-test/tests/A.html.ref @@ -0,0 +1,183 @@ +<!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 + >A</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_A.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >A</p + ></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" + ><span class="keyword" + >data</span + > <a href="" + >A</a + > = <a href="" + >A</a + ></li + ><li class="src short" + ><a href="" + >other</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >test2</a + > :: <a href="" + >Bool</a + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >X</a + > = <a href="" + >X</a + ></li + ><li class="src short" + ><a href="" + >reExport</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:A" class="def" + >A</a + > </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A" class="def" + >A</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:other" class="def" + >other</a + > :: <a href="" + >Int</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a name="v:test2" class="def" + >test2</a + > :: <a href="" + >Bool</a + ></p + ><div class="doc" + ><p + >Doc for test2 +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:X" class="def" + >X</a + > </p + ><div class="doc" + ><p + >Should show up on the page for both modules A and B +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:X" class="def" + >X</a + ></td + ><td class="doc" + ><p + >Doc for consructor +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:reExport" class="def" + >reExport</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >Should show up on the page for both modules A and B +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/AdvanceTypes.hs b/html-test/tests/AdvanceTypes.hs new file mode 100644 index 00000000..939fdf07 --- /dev/null +++ b/html-test/tests/AdvanceTypes.hs @@ -0,0 +1,9 @@ +{-# 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/tests/AdvanceTypes.html.ref b/html-test/tests/AdvanceTypes.html.ref new file mode 100644 index 00000000..bac545be --- /dev/null +++ b/html-test/tests/AdvanceTypes.html.ref @@ -0,0 +1,97 @@ +<!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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</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 + > <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" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:Cons" class="def" + >Cons</a + > :: <a href="" + >Maybe</a + > h -> <a href="" + >Pattern</a + > t -> <a href="" + >Pattern</a + > (h : t)</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/B.hs b/html-test/tests/B.hs new file mode 100644 index 00000000..5fd69acd --- /dev/null +++ b/html-test/tests/B.hs @@ -0,0 +1,8 @@ +module B ( module A, test, reExport, X(..) ) where +import A ( A(..), test2, reExport, X(..) ) + +-- | This link shouldn't work: 'other'. +-- These links should work: 'A.other', 'Data.List.sortBy', 'test2', 'A.test2', 'Data.Maybe.fromMaybe'. +-- Module link: "Prelude". +test :: Int +test = 1 diff --git a/html-test/tests/B.html.ref b/html-test/tests/B.html.ref new file mode 100644 index 00000000..410bc75b --- /dev/null +++ b/html-test/tests/B.html.ref @@ -0,0 +1,175 @@ +<!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 + >B</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_B.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >B</p + ></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" + >module <a href="" + >A</a + ></li + ><li class="src short" + ><a href="" + >test</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >reExport</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >X</a + > = <a href="" + >X</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + >module <a href="" + >A</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a name="v:test" class="def" + >test</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >This link shouldn't work: <code + >other</code + >. + These links should work: <code + ><a href="" + >other</a + ></code + >, <code + ><a href="" + >sortBy</a + ></code + >, <code + ><a href="" + >test2</a + ></code + >, <code + ><a href="" + >test2</a + ></code + >, <code + ><a href="" + >fromMaybe</a + ></code + >. + Module link: <a href="" + >Prelude</a + >. +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:reExport" class="def" + >reExport</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >Should show up on the page for both modules A and B +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:X" class="def" + >X</a + > </p + ><div class="doc" + ><p + >Should show up on the page for both modules A and B +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:X" class="def" + >X</a + ></td + ><td class="doc" + ><p + >Doc for consructor +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug1.hs b/html-test/tests/Bug1.hs new file mode 100644 index 00000000..af1ed4d3 --- /dev/null +++ b/html-test/tests/Bug1.hs @@ -0,0 +1,6 @@ +module Bug1 where + +-- | We should have different anchors for constructors and types\/classes. This +-- hyperlink should point to the type constructor by default: 'T'. +data T = T + diff --git a/html-test/tests/Bug1.html.ref b/html-test/tests/Bug1.html.ref new file mode 100644 index 00000000..f8a86948 --- /dev/null +++ b/html-test/tests/Bug1.html.ref @@ -0,0 +1,103 @@ +<!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 + >Bug1</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_Bug1.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug1</p + ></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" + ><span class="keyword" + >data</span + > <a href="" + >T</a + > = <a href="" + >T</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T" class="def" + >T</a + > </p + ><div class="doc" + ><p + >We should have different anchors for constructors and types/classes. This + hyperlink should point to the type constructor by default: <code + ><a href="" + >T</a + ></code + >. +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:T" class="def" + >T</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug2.hs b/html-test/tests/Bug2.hs new file mode 100644 index 00000000..9121922e --- /dev/null +++ b/html-test/tests/Bug2.hs @@ -0,0 +1,4 @@ +module Bug2 ( x ) where +import B +x :: A +x = A diff --git a/html-test/tests/Bug2.html.ref b/html-test/tests/Bug2.html.ref new file mode 100644 index 00000000..813035a6 --- /dev/null +++ b/html-test/tests/Bug2.html.ref @@ -0,0 +1,65 @@ +<!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 + >Bug2</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_Bug2.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug2</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:x" class="def" + >x</a + > :: <a href="" + >A</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug3.hs b/html-test/tests/Bug3.hs new file mode 100644 index 00000000..67e57892 --- /dev/null +++ b/html-test/tests/Bug3.hs @@ -0,0 +1,6 @@ +module Bug3 where + +-- | /multi-line +-- emphasis/ +foo :: Int +foo = undefined diff --git a/html-test/tests/Bug3.html.ref b/html-test/tests/Bug3.html.ref new file mode 100644 index 00000000..76d4e730 --- /dev/null +++ b/html-test/tests/Bug3.html.ref @@ -0,0 +1,83 @@ +<!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 + >Bug3</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_Bug3.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug3</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >/multi-line + emphasis/ +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug4.hs b/html-test/tests/Bug4.hs new file mode 100644 index 00000000..425a77aa --- /dev/null +++ b/html-test/tests/Bug4.hs @@ -0,0 +1,5 @@ +module Bug4 where +-- | don't use apostrophe's in the wrong place's +foo :: Int +foo = undefined + diff --git a/html-test/tests/Bug4.html.ref b/html-test/tests/Bug4.html.ref new file mode 100644 index 00000000..9e852978 --- /dev/null +++ b/html-test/tests/Bug4.html.ref @@ -0,0 +1,82 @@ +<!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 + >Bug4</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_Bug4.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug4</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >don't use apostrophe's in the wrong place's +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug6.hs b/html-test/tests/Bug6.hs new file mode 100644 index 00000000..17411f31 --- /dev/null +++ b/html-test/tests/Bug6.hs @@ -0,0 +1,23 @@ +-- | Exporting records. +module Bug6( A(A), B(B), b, C(C,c1,c2), D(D,d1), E(E) ) where + +-- | +-- This record is exported without its field +data A = A { a :: Int } + +-- | +-- .. with its field, but the field is named separately in the export list +-- (the field isn't documented separately since it is already documented here) +data B = B { b :: Int } + +-- | +-- .. with fields names as subordinate names in the export +data C = C { c1 :: Int, c2 :: Int } + +-- | +-- .. with only some of the fields exported (we can't handle this one - +-- how do we render the declaration?) +data D = D { d1 :: Int, d2 :: Int } + +-- | a newtype with a field +newtype E = E { e :: Int } diff --git a/html-test/tests/Bug6.html.ref b/html-test/tests/Bug6.html.ref new file mode 100644 index 00000000..606e45e3 --- /dev/null +++ b/html-test/tests/Bug6.html.ref @@ -0,0 +1,335 @@ +<!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 + >Bug6</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_Bug6.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug6</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >Exporting records. +</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" + ><span class="keyword" + >data</span + > <a href="" + >A</a + > = <a href="" + >A</a + > <a href="" + >Int</a + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >B</a + > = <a href="" + >B</a + > {<ul class="subs" + ><li + ><a href="" + >b</a + > :: <a href="" + >Int</a + ></li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >C</a + > = <a href="" + >C</a + > {<ul class="subs" + ><li + ><a href="" + >c1</a + > :: <a href="" + >Int</a + ></li + ><li + ><a href="" + >c2</a + > :: <a href="" + >Int</a + ></li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >D</a + > = <a href="" + >D</a + > <a href="" + >Int</a + > <a href="" + >Int</a + ></li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >E</a + > = <a href="" + >E</a + > <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:A" class="def" + >A</a + > </p + ><div class="doc" + ><p + >This record is exported without its field +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A" class="def" + >A</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:B" class="def" + >B</a + > </p + ><div class="doc" + ><p + >.. with its field, but the field is named separately in the export list + (the field isn't documented separately since it is already documented here) +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:B" class="def" + >B</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:C" class="def" + >C</a + > </p + ><div class="doc" + ><p + >.. with fields names as subordinate names in the export +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:C" class="def" + >C</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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" + > </dd + ><dt class="src" + ><a name="v:c2" class="def" + >c2</a + > :: <a href="" + >Int</a + ></dt + ><dd class="doc empty" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:D" class="def" + >D</a + > </p + ><div class="doc" + ><p + >.. with only some of the fields exported (we can't handle this one - + how do we render the declaration?) +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:D" class="def" + >D</a + > <a href="" + >Int</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:E" class="def" + >E</a + > </p + ><div class="doc" + ><p + >a newtype with a field +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:E" class="def" + >E</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug7.hs b/html-test/tests/Bug7.hs new file mode 100644 index 00000000..8cf57914 --- /dev/null +++ b/html-test/tests/Bug7.hs @@ -0,0 +1,12 @@ +-- | This module caused a duplicate instance in the documentation for the Foo +-- type. +module Bug7 where + +-- | The Foo datatype +data Foo = Foo + +-- | The Bar class +class Bar x y + +-- | Just one instance +instance Bar Foo Foo diff --git a/html-test/tests/Bug7.html.ref b/html-test/tests/Bug7.html.ref new file mode 100644 index 00000000..8ac72b16 --- /dev/null +++ b/html-test/tests/Bug7.html.ref @@ -0,0 +1,173 @@ +<!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 + >Bug7</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_Bug7.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug7</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >This module caused a duplicate instance in the documentation for the Foo + type. +</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" + ><span class="keyword" + >data</span + > <a href="" + >Foo</a + > = <a href="" + >Foo</a + ></li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >Bar</a + > x y </li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Foo" class="def" + >Foo</a + > </p + ><div class="doc" + ><p + >The Foo datatype +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Foo" class="def" + >Foo</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ><div class="subs instances" + ><p id="control.i:Foo" class="caption collapser" onclick="toggleSection('i:Foo')" + >Instances</p + ><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 + ><td class="doc" + ><p + >Just one instance +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:Bar" class="def" + >Bar</a + > x y </p + ><div class="doc" + ><p + >The Bar class +</p + ></div + ><div class="subs instances" + ><p id="control.i:Bar" class="caption collapser" onclick="toggleSection('i:Bar')" + >Instances</p + ><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 + ><td class="doc" + ><p + >Just one instance +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bug8.hs b/html-test/tests/Bug8.hs new file mode 100644 index 00000000..18df63c8 --- /dev/null +++ b/html-test/tests/Bug8.hs @@ -0,0 +1,14 @@ +module Bug8 where + +infix --> +infix ---> + +data Typ = Type (String,[Typ]) + | TFree (String, [String]) + +x --> y = Type("fun",[s,t]) +(--->) = flip $ foldr (-->) + +s = undefined +t = undefined +main = undefined diff --git a/html-test/tests/Bug8.html.ref b/html-test/tests/Bug8.html.ref new file mode 100644 index 00000000..469151f1 --- /dev/null +++ b/html-test/tests/Bug8.html.ref @@ -0,0 +1,131 @@ +<!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 + >Bug8</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_Bug8.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bug8</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Typ" class="def" + >Typ</a + > </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Type" class="def" + >Type</a + > (<a href="" + >String</a + >, [<a href="" + >Typ</a + >])</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:TFree" class="def" + >TFree</a + > (<a href="" + >String</a + >, [<a href="" + >String</a + >])</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:-45--45--62-" class="def" + >(-->)</a + > :: t -> t1 -> <a href="" + >Typ</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a name="v:-45--45--45--62-" class="def" + >(--->)</a + > :: [a] -> <a href="" + >Typ</a + > -> <a href="" + >Typ</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a name="v:s" class="def" + >s</a + > :: a</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:t" class="def" + >t</a + > :: a</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:main" class="def" + >main</a + > :: a</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/BugDeprecated.hs b/html-test/tests/BugDeprecated.hs new file mode 100644 index 00000000..0f7ac2eb --- /dev/null +++ b/html-test/tests/BugDeprecated.hs @@ -0,0 +1,18 @@ +module BugDeprecated where + +foo, bar, baz :: Int +foo = 23 +bar = 23 +baz = 23 +{-# DEPRECATED foo "for foo" #-} +{-# DEPRECATED bar "for bar" #-} +{-# DEPRECATED baz "for baz" #-} + +-- | some documentation for one, two and three +one, two, three :: Int +one = 23 +two = 23 +three = 23 +{-# DEPRECATED one "for one" #-} +{-# DEPRECATED two "for two" #-} +{-# DEPRECATED three "for three" #-} diff --git a/html-test/tests/BugDeprecated.html.ref b/html-test/tests/BugDeprecated.html.ref new file mode 100644 index 00000000..913b189d --- /dev/null +++ b/html-test/tests/BugDeprecated.html.ref @@ -0,0 +1,198 @@ +<!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 + >BugDeprecated</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_BugDeprecated.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >BugDeprecated</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >baz</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >bar</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >one</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >three</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >two</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for foo +</p + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:baz" class="def" + >baz</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for baz +</p + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:bar" class="def" + >bar</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for bar +</p + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:one" class="def" + >one</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for one +</p + ></div + ><p + >some documentation for one, two and three +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:three" class="def" + >three</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for three +</p + ></div + ><p + >some documentation for one, two and three +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:two" class="def" + >two</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for two +</p + ></div + ><p + >some documentation for one, two and three +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/BugExportHeadings.hs b/html-test/tests/BugExportHeadings.hs new file mode 100644 index 00000000..a5493a08 --- /dev/null +++ b/html-test/tests/BugExportHeadings.hs @@ -0,0 +1,29 @@ +-- test for #192 +module BugExportHeadings ( +-- * Foo + foo +-- * Bar +, bar +-- * Baz +, baz + +-- * One +, one +-- * Two +, two +-- * Three +, three +) where + +foo, bar, baz :: Int +foo = 23 +bar = 23 +baz = 23 + +one, two, three :: Int +one = 23 +two = 23 +three = 23 +{-# DEPRECATED one "for one" #-} +{-# DEPRECATED two "for two" #-} +{-# DEPRECATED three "for three" #-} diff --git a/html-test/tests/BugExportHeadings.html.ref b/html-test/tests/BugExportHeadings.html.ref new file mode 100644 index 00000000..457e2c50 --- /dev/null +++ b/html-test/tests/BugExportHeadings.html.ref @@ -0,0 +1,220 @@ +<!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 + >BugExportHeadings</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_BugExportHeadings.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >BugExportHeadings</p + ></div + ><div id="table-of-contents" + ><p class="caption" + >Contents</p + ><ul + ><li + ><a href="" + >Foo +</a + ></li + ><li + ><a href="" + >Bar +</a + ></li + ><li + ><a href="" + >Baz +</a + ></li + ><li + ><a href="" + >One +</a + ></li + ><li + ><a href="" + >Two +</a + ></li + ><li + ><a href="" + >Three +</a + ></li + ></ul + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >bar</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >baz</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >one</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >two</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >three</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 id="g:1" + >Foo +</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ></div + ><h1 id="g:2" + >Bar +</h1 + ><div class="top" + ><p class="src" + ><a name="v:bar" class="def" + >bar</a + > :: <a href="" + >Int</a + ></p + ></div + ><h1 id="g:3" + >Baz +</h1 + ><div class="top" + ><p class="src" + ><a name="v:baz" class="def" + >baz</a + > :: <a href="" + >Int</a + ></p + ></div + ><h1 id="g:4" + >One +</h1 + ><div class="top" + ><p class="src" + ><a name="v:one" class="def" + >one</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for one +</p + ></div + ></div + ></div + ><h1 id="g:5" + >Two +</h1 + ><div class="top" + ><p class="src" + ><a name="v:two" class="def" + >two</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for two +</p + ></div + ></div + ></div + ><h1 id="g:6" + >Three +</h1 + ><div class="top" + ><p class="src" + ><a name="v:three" class="def" + >three</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: for three +</p + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Bugs.hs b/html-test/tests/Bugs.hs new file mode 100644 index 00000000..8e1f0079 --- /dev/null +++ b/html-test/tests/Bugs.hs @@ -0,0 +1,3 @@ +module Bugs where + +data A a = A a (a -> Int) diff --git a/html-test/tests/Bugs.html.ref b/html-test/tests/Bugs.html.ref new file mode 100644 index 00000000..c5a4ca9d --- /dev/null +++ b/html-test/tests/Bugs.html.ref @@ -0,0 +1,81 @@ +<!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 + >Bugs</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_Bugs.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Bugs</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:A" class="def" + >A</a + > a </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A" class="def" + >A</a + > a (a -> <a href="" + >Int</a + >)</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/CrossPackageDocs.hs b/html-test/tests/CrossPackageDocs.hs new file mode 100644 index 00000000..4d529f79 --- /dev/null +++ b/html-test/tests/CrossPackageDocs.hs @@ -0,0 +1,4 @@ +module CrossPackageDocs (map, IsString(..), runInteractiveProcess) where + +import System.Process +import Data.String diff --git a/html-test/tests/CrossPackageDocs.html.ref b/html-test/tests/CrossPackageDocs.html.ref new file mode 100644 index 00000000..fea3d0cc --- /dev/null +++ b/html-test/tests/CrossPackageDocs.html.ref @@ -0,0 +1,298 @@ +<!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 + >CrossPackageDocs</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_CrossPackageDocs.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >CrossPackageDocs</p + ></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="" + >map</a + > :: (a -> b) -> [a] -> [b]</li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >IsString</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >fromString</a + > :: <a href="" + >String</a + > -> a</li + ></ul + ></li + ><li class="src short" + ><a href="" + >runInteractiveProcess</a + > :: <a href="" + >FilePath</a + > -> [<a href="" + >String</a + >] -> <a href="" + >Maybe</a + > <a href="" + >FilePath</a + > -> <a href="" + >Maybe</a + > [(<a href="" + >String</a + >, <a href="" + >String</a + >)] -> <a href="" + >IO</a + > (<a href="" + >Handle</a + >, <a href="" + >Handle</a + >, <a href="" + >Handle</a + >, <a href="" + >ProcessHandle</a + >)</li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:map" class="def" + >map</a + > :: (a -> b) -> [a] -> [b]</p + ><div class="doc" + ><p + ><code + ><a href="" + >map</a + ></code + > <code + >f xs</code + > is the list obtained by applying <code + >f</code + > to each element + of <code + >xs</code + >, i.e., +</p + ><pre + > map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] + map f [x1, x2, ...] == [f x1, f x2, ...] +</pre + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:IsString" class="def" + >IsString</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><p + >Class for string-like datastructures; used by the overloaded string + extension (-foverloaded-strings in GHC). +</p + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:fromString" class="def" + >fromString</a + > :: <a href="" + >String</a + > -> a</p + ></div + ><div class="subs instances" + ><p id="control.i:IsString" class="caption collapser" onclick="toggleSection('i:IsString')" + >Instances</p + ><div id="section.i:IsString" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >IsString</a + > [<a href="" + >Char</a + >]</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:runInteractiveProcess" class="def" + >runInteractiveProcess</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: <a href="" + >FilePath</a + ></td + ><td class="doc" + ><p + >Filename of the executable (see <code + ><a href="" + >proc</a + ></code + > for details) +</p + ></td + ></tr + ><tr + ><td class="src" + >-> [<a href="" + >String</a + >]</td + ><td class="doc" + ><p + >Arguments to pass to the executable +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >Maybe</a + > <a href="" + >FilePath</a + ></td + ><td class="doc" + ><p + >Optional path to the working directory +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >Maybe</a + > [(<a href="" + >String</a + >, <a href="" + >String</a + >)]</td + ><td class="doc" + ><p + >Optional environment (otherwise inherit) +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >IO</a + > (<a href="" + >Handle</a + >, <a href="" + >Handle</a + >, <a href="" + >Handle</a + >, <a href="" + >ProcessHandle</a + >)</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ><div class="doc" + ><p + >Runs a raw command, and returns <code + ><a href="" + >Handle</a + ></code + >s that may be used to communicate + with the process via its <code + >stdin</code + >, <code + >stdout</code + > and <code + >stderr</code + > respectively. +</p + ><p + >For example, to start a process and feed a string to its stdin: +</p + ><pre + > (inp,out,err,pid) <- runInteractiveProcess "..." + forkIO (hPutStr inp str) +</pre + ><p + >The <code + ><a href="" + >Handle</a + ></code + >s are initially in binary mode; if you need them to be + in text mode then use <code + ><a href="" + >hSetBinaryMode</a + ></code + >. +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedClass.hs b/html-test/tests/DeprecatedClass.hs new file mode 100644 index 00000000..018904ab --- /dev/null +++ b/html-test/tests/DeprecatedClass.hs @@ -0,0 +1,15 @@ +module DeprecatedClass where + +-- | some class +class SomeClass a where + -- | documentation for foo + foo :: a -> a + +{-# DEPRECATED SomeClass "SomeClass" #-} +{-# DEPRECATED foo "foo" #-} + +class SomeOtherClass a where + bar :: a -> a + +{-# DEPRECATED SomeOtherClass "SomeOtherClass" #-} +{-# DEPRECATED bar "bar" #-} diff --git a/html-test/tests/DeprecatedClass.html.ref b/html-test/tests/DeprecatedClass.html.ref new file mode 100644 index 00000000..d716c1d8 --- /dev/null +++ b/html-test/tests/DeprecatedClass.html.ref @@ -0,0 +1,161 @@ +<!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 + >DeprecatedClass</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_DeprecatedClass.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedClass</p + ></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" + ><span class="keyword" + >class</span + > <a href="" + >SomeClass</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >foo</a + > :: a -> a</li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >SomeOtherClass</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >bar</a + > :: a -> a</li + ></ul + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:SomeClass" class="def" + >SomeClass</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: SomeClass +</p + ></div + ><p + >some class +</p + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: a -> a</p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: foo +</p + ></div + ><p + >documentation for foo +</p + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:SomeOtherClass" class="def" + >SomeOtherClass</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: SomeOtherClass +</p + ></div + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:bar" class="def" + >bar</a + > :: a -> a</p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: bar +</p + ></div + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedData.hs b/html-test/tests/DeprecatedData.hs new file mode 100644 index 00000000..c40ba122 --- /dev/null +++ b/html-test/tests/DeprecatedData.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE TypeFamilies #-} +module DeprecatedData where + +-- | type Foo +data Foo = Foo -- ^ constructor Foo + | Bar -- ^ constructor Bar + +{-# DEPRECATED Foo "Foo" #-} +{-# DEPRECATED Bar "Bar" #-} + +data One = One + | Two + +{-# DEPRECATED One "One" #-} +{-# DEPRECATED Two "Two" #-} diff --git a/html-test/tests/DeprecatedData.html.ref b/html-test/tests/DeprecatedData.html.ref new file mode 100644 index 00000000..24758345 --- /dev/null +++ b/html-test/tests/DeprecatedData.html.ref @@ -0,0 +1,198 @@ +<!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 + >DeprecatedData</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_DeprecatedData.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedData</p + ></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" + ><span class="keyword" + >data</span + > <a href="" + >Foo</a + > <ul class="subs" + ><li + >= <a href="" + >Foo</a + > </li + ><li + >| <a href="" + >Bar</a + > </li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >One</a + > <ul class="subs" + ><li + >= <a href="" + >One</a + > </li + ><li + >| <a href="" + >Two</a + > </li + ></ul + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Foo" class="def" + >Foo</a + > </p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: Foo +</p + ></div + ><p + >type Foo +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Foo" class="def" + >Foo</a + ></td + ><td class="doc" + ><div class="warning" + ><p + >Deprecated: Foo +</p + ></div + ><p + >constructor Foo +</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:Bar" class="def" + >Bar</a + ></td + ><td class="doc" + ><div class="warning" + ><p + >Deprecated: Bar +</p + ></div + ><p + >constructor Bar +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:One" class="def" + >One</a + > </p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: One +</p + ></div + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:One" class="def" + >One</a + ></td + ><td class="doc" + ><div class="warning" + ><p + >Deprecated: One +</p + ></div + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:Two" class="def" + >Two</a + ></td + ><td class="doc" + ><div class="warning" + ><p + >Deprecated: Two +</p + ></div + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedFunction.hs b/html-test/tests/DeprecatedFunction.hs new file mode 100644 index 00000000..8d626435 --- /dev/null +++ b/html-test/tests/DeprecatedFunction.hs @@ -0,0 +1,10 @@ +module DeprecatedFunction where + +-- | some documentation for foo +foo :: Int +foo = 23 +{-# DEPRECATED foo "use `bar` instead" #-} + +-- | some documentation for bar +bar :: Int +bar = 42 diff --git a/html-test/tests/DeprecatedFunction.html.ref b/html-test/tests/DeprecatedFunction.html.ref new file mode 100644 index 00000000..1fc678bb --- /dev/null +++ b/html-test/tests/DeprecatedFunction.html.ref @@ -0,0 +1,110 @@ +<!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 + >DeprecatedFunction</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_DeprecatedFunction.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedFunction</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >bar</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: use <code + ><a href="" + >bar</a + ></code + > instead +</p + ></div + ><p + >some documentation for foo +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:bar" class="def" + >bar</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >some documentation for bar +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedFunction2.hs b/html-test/tests/DeprecatedFunction2.hs new file mode 100644 index 00000000..bdbbf95c --- /dev/null +++ b/html-test/tests/DeprecatedFunction2.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction2 where + + +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/html-test/tests/DeprecatedFunction2.html.ref b/html-test/tests/DeprecatedFunction2.html.ref new file mode 100644 index 00000000..b5068c8e --- /dev/null +++ b/html-test/tests/DeprecatedFunction2.html.ref @@ -0,0 +1,84 @@ +<!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 + >DeprecatedFunction2</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_DeprecatedFunction2.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedFunction2</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: use bar instead +</p + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedFunction3.hs b/html-test/tests/DeprecatedFunction3.hs new file mode 100644 index 00000000..ca719bda --- /dev/null +++ b/html-test/tests/DeprecatedFunction3.hs @@ -0,0 +1,6 @@ +module DeprecatedFunction3 where + + + +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} diff --git a/html-test/tests/DeprecatedFunction3.html.ref b/html-test/tests/DeprecatedFunction3.html.ref new file mode 100644 index 00000000..f24eb666 --- /dev/null +++ b/html-test/tests/DeprecatedFunction3.html.ref @@ -0,0 +1,84 @@ +<!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 + >DeprecatedFunction3</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_DeprecatedFunction3.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedFunction3</p + ></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="" + >foo</a + > :: <a href="" + >Integer</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Integer</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: use bar instead +</p + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedModule.hs b/html-test/tests/DeprecatedModule.hs new file mode 100644 index 00000000..369dba4f --- /dev/null +++ b/html-test/tests/DeprecatedModule.hs @@ -0,0 +1,5 @@ +-- | Documentation for "DeprecatedModule". +module DeprecatedModule {-# DEPRECATED "Use \"Foo\" instead" #-} where + +foo :: Int +foo = 23 diff --git a/html-test/tests/DeprecatedModule.html.ref b/html-test/tests/DeprecatedModule.html.ref new file mode 100644 index 00000000..0ca4fafe --- /dev/null +++ b/html-test/tests/DeprecatedModule.html.ref @@ -0,0 +1,83 @@ +<!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 + >DeprecatedModule</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_DeprecatedModule.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedModule</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: Use <a href="" + >Foo</a + > instead +</p + ></div + ><p + >Documentation for <a href="" + >DeprecatedModule</a + >. +</p + ></div + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedModule2.hs b/html-test/tests/DeprecatedModule2.hs new file mode 100644 index 00000000..94185297 --- /dev/null +++ b/html-test/tests/DeprecatedModule2.hs @@ -0,0 +1,4 @@ +module DeprecatedModule2 {-# DEPRECATED "Use Foo instead" #-} where + +foo :: Int +foo = 23 diff --git a/html-test/tests/DeprecatedModule2.html.ref b/html-test/tests/DeprecatedModule2.html.ref new file mode 100644 index 00000000..0a313ae9 --- /dev/null +++ b/html-test/tests/DeprecatedModule2.html.ref @@ -0,0 +1,76 @@ +<!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 + >DeprecatedModule2</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_DeprecatedModule2.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedModule2</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: Use Foo instead +</p + ></div + ></div + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedNewtype.hs b/html-test/tests/DeprecatedNewtype.hs new file mode 100644 index 00000000..254f1f55 --- /dev/null +++ b/html-test/tests/DeprecatedNewtype.hs @@ -0,0 +1,10 @@ +module DeprecatedNewtype where + +-- | some documentation +newtype SomeNewType = SomeNewTypeConst String {- ^ constructor docu -} +{-# DEPRECATED SomeNewType "SomeNewType" #-} +{-# DEPRECATED SomeNewTypeConst "SomeNewTypeConst" #-} + +newtype SomeOtherNewType = SomeOtherNewTypeConst String +{-# DEPRECATED SomeOtherNewType "SomeOtherNewType" #-} +{-# DEPRECATED SomeOtherNewTypeConst "SomeOtherNewTypeConst" #-} diff --git a/html-test/tests/DeprecatedNewtype.html.ref b/html-test/tests/DeprecatedNewtype.html.ref new file mode 100644 index 00000000..521ffb92 --- /dev/null +++ b/html-test/tests/DeprecatedNewtype.html.ref @@ -0,0 +1,161 @@ +<!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 + >DeprecatedNewtype</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_DeprecatedNewtype.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedNewtype</p + ></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" + ><span class="keyword" + >newtype</span + > <a href="" + >SomeNewType</a + > = <a href="" + >SomeNewTypeConst</a + > <a href="" + >String</a + ></li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >SomeOtherNewType</a + > = <a href="" + >SomeOtherNewTypeConst</a + > <a href="" + >String</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:SomeNewType" class="def" + >SomeNewType</a + > </p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: SomeNewType +</p + ></div + ><p + >some documentation +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:SomeNewTypeConst" class="def" + >SomeNewTypeConst</a + > <a href="" + >String</a + ></td + ><td class="doc" + ><div class="warning" + ><p + >Deprecated: SomeNewTypeConst +</p + ></div + ><p + >constructor docu +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:SomeOtherNewType" class="def" + >SomeOtherNewType</a + > </p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: SomeOtherNewType +</p + ></div + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:SomeOtherNewTypeConst" class="def" + >SomeOtherNewTypeConst</a + > <a href="" + >String</a + ></td + ><td class="doc" + ><div class="warning" + ><p + >Deprecated: SomeOtherNewTypeConst +</p + ></div + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedReExport.hs b/html-test/tests/DeprecatedReExport.hs new file mode 100644 index 00000000..f851e2ff --- /dev/null +++ b/html-test/tests/DeprecatedReExport.hs @@ -0,0 +1,16 @@ +-- | +-- What is tested here: +-- +-- * Deprecation messages are shown for re-exported items. +-- +module DeprecatedReExport ( +-- * Re-exported from an other module + foo +-- * Re-exported from an other package +-- | Not yet working, see <http://trac.haskell.org/haddock/ticket/223> +-- , isEmptyChan +, +) where + +import DeprecatedFunction +import Control.Concurrent.Chan diff --git a/html-test/tests/DeprecatedReExport.html.ref b/html-test/tests/DeprecatedReExport.html.ref new file mode 100644 index 00000000..611c181d --- /dev/null +++ b/html-test/tests/DeprecatedReExport.html.ref @@ -0,0 +1,133 @@ +<!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 + >DeprecatedReExport</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_DeprecatedReExport.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedReExport</p + ></div + ><div id="table-of-contents" + ><p class="caption" + >Contents</p + ><ul + ><li + ><a href="" + >Re-exported from an other module +</a + ></li + ><li + ><a href="" + >Re-exported from an other package +</a + ></li + ></ul + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >What is tested here: +</p + ><ul + ><li + > Deprecation messages are shown for re-exported items. +</li + ></ul + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 id="g:1" + >Re-exported from an other module +</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: use <code + ><a href="" + >bar</a + ></code + > instead +</p + ></div + ><p + >some documentation for foo +</p + ></div + ></div + ><h1 id="g:2" + >Re-exported from an other package +</h1 + ><div class="doc" + ><p + >Not yet working, see <a href="" + >http://trac.haskell.org/haddock/ticket/223</a + > + , isEmptyChan +</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedRecord.hs b/html-test/tests/DeprecatedRecord.hs new file mode 100644 index 00000000..d44499e7 --- /dev/null +++ b/html-test/tests/DeprecatedRecord.hs @@ -0,0 +1,9 @@ +module DeprecatedRecord where + +-- | type Foo +data Foo = Foo { + fooName :: String -- ^ some name +, fooValue :: Int -- ^ some value +} + +{-# DEPRECATED fooValue "do not use this" #-} diff --git a/html-test/tests/DeprecatedRecord.html.ref b/html-test/tests/DeprecatedRecord.html.ref new file mode 100644 index 00000000..9ade8377 --- /dev/null +++ b/html-test/tests/DeprecatedRecord.html.ref @@ -0,0 +1,151 @@ +<!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 + >DeprecatedRecord</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_DeprecatedRecord.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedRecord</p + ></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" + ><span class="keyword" + >data</span + > <a href="" + >Foo</a + > = <a href="" + >Foo</a + > {<ul class="subs" + ><li + ><a href="" + >fooName</a + > :: <a href="" + >String</a + ></li + ><li + ><a href="" + >fooValue</a + > :: <a href="" + >Int</a + ></li + ></ul + >}</li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Foo" class="def" + >Foo</a + > </p + ><div class="doc" + ><p + >type Foo +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Foo" class="def" + >Foo</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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" + ><p + >Deprecated: do not use this +</p + ></div + ><p + >some value +</p + ></dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedTypeFamily.hs b/html-test/tests/DeprecatedTypeFamily.hs new file mode 100644 index 00000000..70473bb8 --- /dev/null +++ b/html-test/tests/DeprecatedTypeFamily.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module DeprecatedTypeFamily where + +-- | some documentation +data family SomeTypeFamily k :: * -> * +{-# DEPRECATED SomeTypeFamily "SomeTypeFamily" #-} + +data family SomeOtherTypeFamily k :: * -> * +{-# DEPRECATED SomeOtherTypeFamily "SomeOtherTypeFamily" #-} diff --git a/html-test/tests/DeprecatedTypeFamily.html.ref b/html-test/tests/DeprecatedTypeFamily.html.ref new file mode 100644 index 00000000..ffc069a6 --- /dev/null +++ b/html-test/tests/DeprecatedTypeFamily.html.ref @@ -0,0 +1,108 @@ +<!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 + >DeprecatedTypeFamily</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_DeprecatedTypeFamily.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedTypeFamily</p + ></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" + ><span class="keyword" + >data family</span + > <a href="" + >SomeTypeFamily</a + > k :: * -> *</li + ><li class="src short" + ><span class="keyword" + >data family</span + > <a href="" + >SomeOtherTypeFamily</a + > k :: * -> *</li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data family</span + > <a name="t:SomeTypeFamily" class="def" + >SomeTypeFamily</a + > k :: * -> *</p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: SomeTypeFamily +</p + ></div + ><p + >some documentation +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data family</span + > <a name="t:SomeOtherTypeFamily" class="def" + >SomeOtherTypeFamily</a + > k :: * -> *</p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: SomeOtherTypeFamily +</p + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecatedTypeSynonym.hs b/html-test/tests/DeprecatedTypeSynonym.hs new file mode 100644 index 00000000..34df47da --- /dev/null +++ b/html-test/tests/DeprecatedTypeSynonym.hs @@ -0,0 +1,9 @@ + +module DeprecatedTypeSynonym where + +-- | some documentation +type TypeSyn = String +{-# DEPRECATED TypeSyn "TypeSyn" #-} + +type OtherTypeSyn = String +{-# DEPRECATED OtherTypeSyn "OtherTypeSyn" #-} diff --git a/html-test/tests/DeprecatedTypeSynonym.html.ref b/html-test/tests/DeprecatedTypeSynonym.html.ref new file mode 100644 index 00000000..665dcf5d --- /dev/null +++ b/html-test/tests/DeprecatedTypeSynonym.html.ref @@ -0,0 +1,116 @@ +<!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 + >DeprecatedTypeSynonym</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_DeprecatedTypeSynonym.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecatedTypeSynonym</p + ></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" + ><span class="keyword" + >type</span + > <a href="" + >TypeSyn</a + > = <a href="" + >String</a + ></li + ><li class="src short" + ><span class="keyword" + >type</span + > <a href="" + >OtherTypeSyn</a + > = <a href="" + >String</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >type</span + > <a name="t:TypeSyn" class="def" + >TypeSyn</a + > = <a href="" + >String</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: TypeSyn +</p + ></div + ><p + >some documentation +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >type</span + > <a name="t:OtherTypeSyn" class="def" + >OtherTypeSyn</a + > = <a href="" + >String</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: OtherTypeSyn +</p + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/DeprecationMessageParseError.hs b/html-test/tests/DeprecationMessageParseError.hs new file mode 100644 index 00000000..2f8fb492 --- /dev/null +++ b/html-test/tests/DeprecationMessageParseError.hs @@ -0,0 +1,12 @@ +-- | +-- What is tested here: +-- +-- * If parsing of a deprecation message fails, the message is included +-- verbatim. +-- +module DeprecationMessageParseError where + +-- | some documentation for foo +foo :: Int +foo = 23 +{-# DEPRECATED foo "use @bar instead" #-} diff --git a/html-test/tests/DeprecationMessageParseError.html.ref b/html-test/tests/DeprecationMessageParseError.html.ref new file mode 100644 index 00000000..75f9bf54 --- /dev/null +++ b/html-test/tests/DeprecationMessageParseError.html.ref @@ -0,0 +1,101 @@ +<!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 + >DeprecationMessageParseError</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_DeprecationMessageParseError.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >DeprecationMessageParseError</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >What is tested here: +</p + ><ul + ><li + > If parsing of a deprecation message fails, the message is included + verbatim. +</li + ></ul + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><div class="warning" + ><p + >Deprecated: use @bar instead</p + ></div + ><p + >some documentation for foo +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Examples.hs b/html-test/tests/Examples.hs new file mode 100644 index 00000000..c8c450f1 --- /dev/null +++ b/html-test/tests/Examples.hs @@ -0,0 +1,39 @@ +module Examples where + +-- | Fibonacci number of given 'Integer'. +-- +-- Examples: +-- +-- >>> fib 5 +-- 5 +-- >>> fib 10 +-- 55 +-- +-- >>> fib 10 +-- 55 +-- +-- One more Example: +-- +-- >>> fib 5 +-- 5 +-- +-- One more Example: +-- +-- >>> fib 5 +-- 5 +-- +-- Example with an import: +-- +-- >>> import Data.Char +-- >>> isSpace 'a' +-- False +-- +-- >>> putStrLn "foo\n\nbar" +-- foo +-- <BLANKLINE> +-- bar +-- +fib :: Integer -> Integer +fib 0 = 0 +fib 1 = 1 +fib n = fib (n - 1) + fib (n - 2) diff --git a/html-test/tests/Examples.html.ref b/html-test/tests/Examples.html.ref new file mode 100644 index 00000000..7ebe7770 --- /dev/null +++ b/html-test/tests/Examples.html.ref @@ -0,0 +1,179 @@ +<!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 + >Examples</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_Examples.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Examples</p + ></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="" + >fib</a + > :: <a href="" + >Integer</a + > -> <a href="" + >Integer</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:fib" class="def" + >fib</a + > :: <a href="" + >Integer</a + > -> <a href="" + >Integer</a + ></p + ><div class="doc" + ><p + >Fibonacci number of given <code + ><a href="" + >Integer</a + ></code + >. +</p + ><p + >Examples: +</p + ><pre class="screen" + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >fib 5 +</code + ></strong + >5 +<code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >fib 10 +</code + ></strong + >55 +</pre + ><pre class="screen" + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >fib 10 +</code + ></strong + >55 +</pre + ><p + >One more Example: +</p + ><pre class="screen" + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >fib 5 +</code + ></strong + >5 +</pre + ><p + >One more Example: +</p + ><pre class="screen" + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >fib 5 +</code + ></strong + >5 +</pre + ><p + >Example with an import: +</p + ><pre class="screen" + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >import Data.Char +</code + ></strong + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >isSpace 'a' +</code + ></strong + >False +</pre + ><pre class="screen" + ><code class="prompt" + >>>> </code + ><strong class="userinput" + ><code + >putStrLn "foo\n\nbar" +</code + ></strong + >foo + +bar +</pre + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/FunArgs.hs b/html-test/tests/FunArgs.hs new file mode 100644 index 00000000..b34d84b7 --- /dev/null +++ b/html-test/tests/FunArgs.hs @@ -0,0 +1,16 @@ +module FunArgs where + +f :: forall a. Ord a + => Int -- ^ First argument + -> a -- ^ Second argument + -> Bool -- ^ Third argument + -> (a -> a) -- ^ Fourth argument + -> () -- ^ Result +f = undefined + + +g :: a -- ^ First argument + -> b -- ^ Second argument + -> c -- ^ Third argument + -> d -- ^ Result +g = undefined diff --git a/html-test/tests/FunArgs.html.ref b/html-test/tests/FunArgs.html.ref new file mode 100644 index 00000000..6c87d1e6 --- /dev/null +++ b/html-test/tests/FunArgs.html.ref @@ -0,0 +1,176 @@ +<!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 + >FunArgs</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_FunArgs.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >FunArgs</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: <span class="keyword" + >forall</span + > a . <a href="" + >Ord</a + > a</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + >=> <a href="" + >Int</a + ></td + ><td class="doc" + ><p + >First argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> a</td + ><td class="doc" + ><p + >Second argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >Bool</a + ></td + ><td class="doc" + ><p + >Third argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> (a -> a)</td + ><td class="doc" + ><p + >Fourth argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> ()</td + ><td class="doc" + ><p + >Result +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:g" class="def" + >g</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: a</td + ><td class="doc" + ><p + >First argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> b</td + ><td class="doc" + ><p + >Second argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> c</td + ><td class="doc" + ><p + >Third argument +</p + ></td + ></tr + ><tr + ><td class="src" + >-> d</td + ><td class="doc" + ><p + >Result +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/GADTRecords.hs b/html-test/tests/GADTRecords.hs new file mode 100644 index 00000000..c77810ad --- /dev/null +++ b/html-test/tests/GADTRecords.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE GADTs #-} +module GADTRecords (H1(..)) where + +-- | h1 +data H1 a b where + C1 :: H1 a b + C2 :: Ord a => [a] -> H1 a a + C3 { field :: Int -- ^ hello docs + } :: H1 Int Int + C4 { field2 :: a -- ^ hello2 docs + } :: H1 Int a + diff --git a/html-test/tests/GADTRecords.html.ref b/html-test/tests/GADTRecords.html.ref new file mode 100644 index 00000000..e3fcd2fe --- /dev/null +++ b/html-test/tests/GADTRecords.html.ref @@ -0,0 +1,234 @@ +<!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 + >GADTRecords</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_GADTRecords.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >GADTRecords</p + ></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" + ><span class="keyword" + >data</span + > <a href="" + >H1</a + > a b <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >C1</a + > :: <a href="" + >H1</a + > a b </li + ><li + ><a href="" + >C2</a + > :: <a href="" + >Ord</a + > a => [a] -> <a href="" + >H1</a + > a a </li + ><li + ><a href="" + >C3</a + > :: { <ul class="subs" + ><li + ><a href="" + >field</a + > :: <a href="" + >Int</a + ></li + ></ul + > } -> <a href="" + >H1</a + > <a href="" + >Int</a + > <a href="" + >Int</a + ></li + ><li + ><a href="" + >C4</a + > :: { <ul class="subs" + ><li + ><a href="" + >field2</a + > :: a</li + ></ul + > } -> <a href="" + >H1</a + > <a href="" + >Int</a + > a</li + ></ul + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:H1" class="def" + >H1</a + > a b <span class="keyword" + >where</span + ></p + ><div class="doc" + ><p + >h1 +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:C1" class="def" + >C1</a + > :: <a href="" + >H1</a + > a b</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:C2" class="def" + >C2</a + > :: <a href="" + >Ord</a + > a => [a] -> <a href="" + >H1</a + > a a</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:C3" class="def" + >C3</a + > :: <a href="" + >Int</a + > -> <a href="" + >H1</a + > <a href="" + >Int</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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 + ></div + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:C4" class="def" + >C4</a + > :: a -> <a href="" + >H1</a + > <a href="" + >Int</a + > a</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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 + ></div + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Hash.hs b/html-test/tests/Hash.hs new file mode 100644 index 00000000..343b69e9 --- /dev/null +++ b/html-test/tests/Hash.hs @@ -0,0 +1,51 @@ +{- | + Implementation of fixed-size hash tables, with a type + class for constructing hash values for structured types. +-} +module Hash ( + -- * The @HashTable@ type + HashTable, + + -- ** Operations on @HashTable@s + new, insert, lookup, + + -- * The @Hash@ class + Hash(..), + ) where + +import Data.Array +import Prelude hiding (lookup) + +-- | A hash table with keys of type @key@ and values of type @val@. +-- The type @key@ should be an instance of 'Eq'. +data HashTable key val = HashTable Int (Array Int [(key,val)]) + +-- | Builds a new hash table with a given size +new :: (Eq key, Hash key) => Int -> IO (HashTable key val) +new = undefined + +-- | Inserts a new element into the hash table +insert :: (Eq key, Hash key) => key -> val -> IO () +insert = undefined + +-- | Looks up a key in the hash table, returns @'Just' val@ if the key +-- was found, or 'Nothing' otherwise. +lookup :: Hash key => key -> IO (Maybe val) +lookup = undefined + +-- | A class of types which can be hashed. +class Hash a where + -- | hashes the value of type @a@ into an 'Int' + hash :: a -> Int + +instance Hash Int where + hash = id + +instance Hash Float where + hash = trunc + +instance (Hash a, Hash b) => Hash (a,b) where + hash (a,b) = hash a `xor` hash b + +trunc = undefined +xor = undefined diff --git a/html-test/tests/Hash.html.ref b/html-test/tests/Hash.html.ref new file mode 100644 index 00000000..b0cd183c --- /dev/null +++ b/html-test/tests/Hash.html.ref @@ -0,0 +1,337 @@ +<!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 + >Hash</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_Hash.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Hash</p + ></div + ><div id="table-of-contents" + ><p class="caption" + >Contents</p + ><ul + ><li + ><a href="" + >The <code + >HashTable</code + > type +</a + ><ul + ><li + ><a href="" + >Operations on <code + >HashTable</code + >s +</a + ></li + ></ul + ></li + ><li + ><a href="" + >The <code + >Hash</code + > class +</a + ></li + ></ul + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >Implementation of fixed-size hash tables, with a type + class for constructing hash values for structured types. +</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" + ><span class="keyword" + >data</span + > <a href="" + >HashTable</a + > key val</li + ><li class="src short" + ><a href="" + >new</a + > :: (<a href="" + >Eq</a + > key, <a href="" + >Hash</a + > key) => <a href="" + >Int</a + > -> <a href="" + >IO</a + > (<a href="" + >HashTable</a + > key val)</li + ><li class="src short" + ><a href="" + >insert</a + > :: (<a href="" + >Eq</a + > key, <a href="" + >Hash</a + > key) => key -> val -> <a href="" + >IO</a + > ()</li + ><li class="src short" + ><a href="" + >lookup</a + > :: <a href="" + >Hash</a + > key => key -> <a href="" + >IO</a + > (<a href="" + >Maybe</a + > val)</li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >Hash</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >hash</a + > :: a -> <a href="" + >Int</a + ></li + ></ul + ></li + ></ul + ></div + ><div id="interface" + ><h1 id="g:1" + >The <code + >HashTable</code + > type +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:HashTable" class="def" + >HashTable</a + > key val </p + ><div class="doc" + ><p + >A hash table with keys of type <code + >key</code + > and values of type <code + >val</code + >. + The type <code + >key</code + > should be an instance of <code + ><a href="" + >Eq</a + ></code + >. +</p + ></div + ></div + ><h2 id="g:2" + >Operations on <code + >HashTable</code + >s +</h2 + ><div class="top" + ><p class="src" + ><a name="v:new" class="def" + >new</a + > :: (<a href="" + >Eq</a + > key, <a href="" + >Hash</a + > key) => <a href="" + >Int</a + > -> <a href="" + >IO</a + > (<a href="" + >HashTable</a + > key val)</p + ><div class="doc" + ><p + >Builds a new hash table with a given size +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:insert" class="def" + >insert</a + > :: (<a href="" + >Eq</a + > key, <a href="" + >Hash</a + > key) => key -> val -> <a href="" + >IO</a + > ()</p + ><div class="doc" + ><p + >Inserts a new element into the hash table +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:lookup" class="def" + >lookup</a + > :: <a href="" + >Hash</a + > key => key -> <a href="" + >IO</a + > (<a href="" + >Maybe</a + > val)</p + ><div class="doc" + ><p + >Looks up a key in the hash table, returns <code + ><code + ><a href="" + >Just</a + ></code + > val</code + > if the key + was found, or <code + ><a href="" + >Nothing</a + ></code + > otherwise. +</p + ></div + ></div + ><h1 id="g:3" + >The <code + >Hash</code + > class +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:Hash" class="def" + >Hash</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><p + >A class of types which can be hashed. +</p + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:hash" class="def" + >hash</a + > :: a -> <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >hashes the value of type <code + >a</code + > into an <code + ><a href="" + >Int</a + ></code + > +</p + ></div + ></div + ><div class="subs instances" + ><p id="control.i:Hash" class="caption collapser" onclick="toggleSection('i:Hash')" + >Instances</p + ><div id="section.i:Hash" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >Hash</a + > <a href="" + >Float</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a href="" + >Hash</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + >(<a href="" + >Hash</a + > a, <a href="" + >Hash</a + > b) => <a href="" + >Hash</a + > (a, b)</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Hidden.hs b/html-test/tests/Hidden.hs new file mode 100644 index 00000000..896da648 --- /dev/null +++ b/html-test/tests/Hidden.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_HADDOCK hide #-} + +module Hidden where + +hidden :: Int -> Int +hidden a = a diff --git a/html-test/tests/HiddenInstances.hs b/html-test/tests/HiddenInstances.hs new file mode 100644 index 00000000..99a6c2fd --- /dev/null +++ b/html-test/tests/HiddenInstances.hs @@ -0,0 +1,35 @@ +-- http://trac.haskell.org/haddock/ticket/37 +module HiddenInstances (VisibleClass, VisibleData) where + +-- | Should be visible +class VisibleClass a + +-- | Should *not* be visible +class HiddenClass a + +-- | Should *not* be visible +data HiddenData = HiddenData + +-- | Should be visible +data VisibleData = VisibleData + +-- | Should be visible +instance VisibleClass Int + +-- | Should be visible +instance VisibleClass VisibleData + +-- | Should be visible +instance Num VisibleData + +-- | Should *not* be visible +instance VisibleClass HiddenData + +-- | Should *not* be visible +instance HiddenClass Int + +-- | Should *not* be visible +instance HiddenClass VisibleData + +-- | Should *not* be visible +instance HiddenClass HiddenData diff --git a/html-test/tests/HiddenInstances.html.ref b/html-test/tests/HiddenInstances.html.ref new file mode 100644 index 00000000..999c114d --- /dev/null +++ b/html-test/tests/HiddenInstances.html.ref @@ -0,0 +1,169 @@ +<!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 + >HiddenInstances</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_HiddenInstances.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >HiddenInstances</p + ></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" + ><span class="keyword" + >class</span + > <a href="" + >VisibleClass</a + > a </li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >VisibleData</a + > </li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:VisibleClass" class="def" + >VisibleClass</a + > a </p + ><div class="doc" + ><p + >Should be visible +</p + ></div + ><div class="subs instances" + ><p id="control.i:VisibleClass" class="caption collapser" onclick="toggleSection('i:VisibleClass')" + >Instances</p + ><div id="section.i:VisibleClass" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >VisibleClass</a + > <a href="" + >Int</a + ></td + ><td class="doc" + ><p + >Should be visible +</p + ></td + ></tr + ><tr + ><td class="src" + ><a href="" + >VisibleClass</a + > <a href="" + >VisibleData</a + ></td + ><td class="doc" + ><p + >Should be visible +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:VisibleData" class="def" + >VisibleData</a + > </p + ><div class="doc" + ><p + >Should be visible +</p + ></div + ><div class="subs instances" + ><p id="control.i:VisibleData" class="caption collapser" onclick="toggleSection('i:VisibleData')" + >Instances</p + ><div id="section.i:VisibleData" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >Num</a + > <a href="" + >VisibleData</a + ></td + ><td class="doc" + ><p + >Should be visible +</p + ></td + ></tr + ><tr + ><td class="src" + ><a href="" + >VisibleClass</a + > <a href="" + >VisibleData</a + ></td + ><td class="doc" + ><p + >Should be visible +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/HiddenInstancesA.hs b/html-test/tests/HiddenInstancesA.hs new file mode 100644 index 00000000..f1775208 --- /dev/null +++ b/html-test/tests/HiddenInstancesA.hs @@ -0,0 +1,17 @@ +{-# OPTIONS_HADDOCK hide #-} +module HiddenInstancesA where + +-- | Should be visible +class Foo a + +-- | Should be visible +data Bar + +-- | Should be visible +instance Foo Bar + +-- | Should *not* be visible +data Baz + +-- | Should *not* be visible +instance Foo Baz diff --git a/html-test/tests/HiddenInstancesB.hs b/html-test/tests/HiddenInstancesB.hs new file mode 100644 index 00000000..eabf0637 --- /dev/null +++ b/html-test/tests/HiddenInstancesB.hs @@ -0,0 +1,2 @@ +module HiddenInstancesB (Foo, Bar) where +import HiddenInstancesA diff --git a/html-test/tests/HiddenInstancesB.html.ref b/html-test/tests/HiddenInstancesB.html.ref new file mode 100644 index 00000000..207a5146 --- /dev/null +++ b/html-test/tests/HiddenInstancesB.html.ref @@ -0,0 +1,143 @@ +<!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 + >HiddenInstancesB</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_HiddenInstancesB.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >HiddenInstancesB</p + ></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" + ><span class="keyword" + >class</span + > <a href="" + >Foo</a + > a </li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >Bar</a + > </li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:Foo" class="def" + >Foo</a + > a </p + ><div class="doc" + ><p + >Should be visible +</p + ></div + ><div class="subs instances" + ><p id="control.i:Foo" class="caption collapser" onclick="toggleSection('i:Foo')" + >Instances</p + ><div id="section.i:Foo" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >Foo</a + > <a href="" + >Bar</a + ></td + ><td class="doc" + ><p + >Should be visible +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Bar" class="def" + >Bar</a + > </p + ><div class="doc" + ><p + >Should be visible +</p + ></div + ><div class="subs instances" + ><p id="control.i:Bar" class="caption collapser" onclick="toggleSection('i:Bar')" + >Instances</p + ><div id="section.i:Bar" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >Foo</a + > <a href="" + >Bar</a + ></td + ><td class="doc" + ><p + >Should be visible +</p + ></td + ></tr + ></table + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Hyperlinks.hs b/html-test/tests/Hyperlinks.hs new file mode 100644 index 00000000..34e64448 --- /dev/null +++ b/html-test/tests/Hyperlinks.hs @@ -0,0 +1,8 @@ +module Hyperlinks where + +-- | +-- A plain URL: <http://example.com/> +-- +-- A URL with a label: <http://example.com/ some link> +foo :: Int +foo = 23 diff --git a/html-test/tests/Hyperlinks.html.ref b/html-test/tests/Hyperlinks.html.ref new file mode 100644 index 00000000..e7351a63 --- /dev/null +++ b/html-test/tests/Hyperlinks.html.ref @@ -0,0 +1,89 @@ +<!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 + >Hyperlinks</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_Hyperlinks.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Hyperlinks</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >A plain URL: <a href="" + >http://example.com/</a + > +</p + ><p + >A URL with a label: <a href="" + >some link</a + > +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/IgnoreExports.hs b/html-test/tests/IgnoreExports.hs new file mode 100644 index 00000000..0321ad02 --- /dev/null +++ b/html-test/tests/IgnoreExports.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_HADDOCK ignore-exports #-} +module IgnoreExports (foo) where + +-- | documentation for foo +foo :: Int +foo = 23 + +-- | documentation for bar +bar :: Int +bar = 23 diff --git a/html-test/tests/IgnoreExports.html.ref b/html-test/tests/IgnoreExports.html.ref new file mode 100644 index 00000000..c661b48c --- /dev/null +++ b/html-test/tests/IgnoreExports.html.ref @@ -0,0 +1,101 @@ +<!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 + >IgnoreExports</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_IgnoreExports.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >IgnoreExports</p + ></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="" + >foo</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >bar</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >documentation for foo +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:bar" class="def" + >bar</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >documentation for bar +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/ModuleWithWarning.hs b/html-test/tests/ModuleWithWarning.hs new file mode 100644 index 00000000..e64d9d7e --- /dev/null +++ b/html-test/tests/ModuleWithWarning.hs @@ -0,0 +1,5 @@ +-- | Documentation for "ModuleWithWarning". +module ModuleWithWarning {-# WARNING "This is an unstable interface. Prefer functions from \"Prelude\" instead!" #-} where + +foo :: Int +foo = 23 diff --git a/html-test/tests/ModuleWithWarning.html.ref b/html-test/tests/ModuleWithWarning.html.ref new file mode 100644 index 00000000..348f0822 --- /dev/null +++ b/html-test/tests/ModuleWithWarning.html.ref @@ -0,0 +1,83 @@ +<!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 + >ModuleWithWarning</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_ModuleWithWarning.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >ModuleWithWarning</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><div class="warning" + ><p + >Warning: This is an unstable interface. Prefer functions from <a href="" + >Prelude</a + > instead! +</p + ></div + ><p + >Documentation for <a href="" + >ModuleWithWarning</a + >. +</p + ></div + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:foo" class="def" + >foo</a + > :: <a href="" + >Int</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/NamedDoc.hs b/html-test/tests/NamedDoc.hs new file mode 100644 index 00000000..7c04ba72 --- /dev/null +++ b/html-test/tests/NamedDoc.hs @@ -0,0 +1,4 @@ +module NamedDoc where + +-- $foo bar + diff --git a/html-test/tests/NamedDoc.html.ref b/html-test/tests/NamedDoc.html.ref new file mode 100644 index 00000000..d2b8ede1 --- /dev/null +++ b/html-test/tests/NamedDoc.html.ref @@ -0,0 +1,68 @@ +<!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 + >NamedDoc</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_NamedDoc.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >NamedDoc</p + ></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')" + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="doc" + ><p + >bar +</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/NoLayout.hs b/html-test/tests/NoLayout.hs new file mode 100644 index 00000000..19b38b1d --- /dev/null +++ b/html-test/tests/NoLayout.hs @@ -0,0 +1,12 @@ + +-- Haddock comments are parsed as separate declarations so we +-- need to insert a ';' when using them with explicit layout. +-- This should probably be changed. + +module NoLayout where { + -- | the function 'g' + ; + g :: Int; + g = undefined + } + diff --git a/html-test/tests/NoLayout.html.ref b/html-test/tests/NoLayout.html.ref new file mode 100644 index 00000000..871add05 --- /dev/null +++ b/html-test/tests/NoLayout.html.ref @@ -0,0 +1,86 @@ +<!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 + >NoLayout</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_NoLayout.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >NoLayout</p + ></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="" + >g</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:g" class="def" + >g</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >the function <code + ><a href="" + >g</a + ></code + > +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/NonGreedy.hs b/html-test/tests/NonGreedy.hs new file mode 100644 index 00000000..f51b55f5 --- /dev/null +++ b/html-test/tests/NonGreedy.hs @@ -0,0 +1,5 @@ +module NonGreedy where + +-- | <url1> <url2> +f :: a +f = undefined diff --git a/html-test/tests/NonGreedy.html.ref b/html-test/tests/NonGreedy.html.ref new file mode 100644 index 00000000..23d3f695 --- /dev/null +++ b/html-test/tests/NonGreedy.html.ref @@ -0,0 +1,82 @@ +<!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 + >NonGreedy</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_NonGreedy.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >NonGreedy</p + ></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="" + >f</a + > :: a</li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: a</p + ><div class="doc" + ><p + ><a href="" + >url1</a + > <a href="" + >url2</a + > +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Properties.hs b/html-test/tests/Properties.hs new file mode 100644 index 00000000..05930ece --- /dev/null +++ b/html-test/tests/Properties.hs @@ -0,0 +1,9 @@ +module Properties where + +-- | Fibonacci number of given 'Integer'. +-- +-- prop> fib n <= fib (n + 1) +fib :: Integer -> Integer +fib 0 = 0 +fib 1 = 1 +fib n = fib (n - 1) + fib (n - 2) diff --git a/html-test/tests/Properties.html.ref b/html-test/tests/Properties.html.ref new file mode 100644 index 00000000..1c4ce893 --- /dev/null +++ b/html-test/tests/Properties.html.ref @@ -0,0 +1,92 @@ +<!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 + >Properties</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_Properties.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Properties</p + ></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="" + >fib</a + > :: <a href="" + >Integer</a + > -> <a href="" + >Integer</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:fib" class="def" + >fib</a + > :: <a href="" + >Integer</a + > -> <a href="" + >Integer</a + ></p + ><div class="doc" + ><p + >Fibonacci number of given <code + ><a href="" + >Integer</a + ></code + >. +</p + ><pre + >fib n <= fib (n + 1)</pre + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/PruneWithWarning.hs b/html-test/tests/PruneWithWarning.hs new file mode 100644 index 00000000..bfa55ea2 --- /dev/null +++ b/html-test/tests/PruneWithWarning.hs @@ -0,0 +1,15 @@ +{-# OPTIONS_HADDOCK prune #-} +-- | +-- What is tested here: +-- +-- * If a binding has a deprecation message but no documentation, it is pruned +-- when @OPTIONS_HADDOCK prune@ is used. +-- +module PruneWithWarning (foo, bar) where + +foo :: Int +foo = 23 +{-# DEPRECATED foo "use bar instead" #-} + +bar :: Int +bar = 42 diff --git a/html-test/tests/PruneWithWarning.html.ref b/html-test/tests/PruneWithWarning.html.ref new file mode 100644 index 00000000..3c31fbdf --- /dev/null +++ b/html-test/tests/PruneWithWarning.html.ref @@ -0,0 +1,72 @@ +<!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 + >PruneWithWarning</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_PruneWithWarning.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >PruneWithWarning</p + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >What is tested here: +</p + ><ul + ><li + > If a binding has a deprecation message but no documentation, it is pruned + when <code + >OPTIONS_HADDOCK prune</code + > is used. +</li + ></ul + ></div + ></div + ><div id="interface" + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/QuasiExpr.hs b/html-test/tests/QuasiExpr.hs new file mode 100644 index 00000000..970759ba --- /dev/null +++ b/html-test/tests/QuasiExpr.hs @@ -0,0 +1,34 @@ +{-# LANGUAGE TemplateHaskell #-} + +-- Used by QuasiQuote. Example taken from the GHC documentation. +module QuasiExpr where + +import Language.Haskell.TH +import Language.Haskell.TH.Quote + +data Expr = IntExpr Integer + | AntiIntExpr String + | BinopExpr BinOp Expr Expr + | AntiExpr String + deriving Show + +data BinOp = AddOp + | SubOp + | MulOp + | DivOp + deriving Show + +eval :: Expr -> Integer +eval (IntExpr n) = n +eval (BinopExpr op x y) = (opToFun op) (eval x) (eval y) + where + opToFun AddOp = (+) + opToFun SubOp = (-) + opToFun MulOp = (*) + opToFun DivOp = div + +expr = QuasiQuoter parseExprExp undefined undefined undefined + +-- cheating... +parseExprExp :: String -> Q Exp +parseExprExp _ = [| BinopExpr AddOp (IntExpr 1) (IntExpr 2) |] diff --git a/html-test/tests/QuasiExpr.html.ref b/html-test/tests/QuasiExpr.html.ref new file mode 100644 index 00000000..0a699f35 --- /dev/null +++ b/html-test/tests/QuasiExpr.html.ref @@ -0,0 +1,221 @@ +<!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 + >QuasiExpr</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_QuasiExpr.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >QuasiExpr</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Expr" class="def" + >Expr</a + > </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:IntExpr" class="def" + >IntExpr</a + > <a href="" + >Integer</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:AntiIntExpr" class="def" + >AntiIntExpr</a + > <a href="" + >String</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:BinopExpr" class="def" + >BinopExpr</a + > <a href="" + >BinOp</a + > <a href="" + >Expr</a + > <a href="" + >Expr</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:AntiExpr" class="def" + >AntiExpr</a + > <a href="" + >String</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ><div class="subs instances" + ><p id="control.i:Expr" class="caption collapser" onclick="toggleSection('i:Expr')" + >Instances</p + ><div id="section.i:Expr" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >Show</a + > <a href="" + >Expr</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:BinOp" class="def" + >BinOp</a + > </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:AddOp" class="def" + >AddOp</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:SubOp" class="def" + >SubOp</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:MulOp" class="def" + >MulOp</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:DivOp" class="def" + >DivOp</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ><div class="subs instances" + ><p id="control.i:BinOp" class="caption collapser" onclick="toggleSection('i:BinOp')" + >Instances</p + ><div id="section.i:BinOp" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >Show</a + > <a href="" + >BinOp</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:eval" class="def" + >eval</a + > :: <a href="" + >Expr</a + > -> <a href="" + >Integer</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a name="v:expr" class="def" + >expr</a + > :: QuasiQuoter</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:parseExprExp" class="def" + >parseExprExp</a + > :: <a href="" + >String</a + > -> Q Exp</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/QuasiQuote.hs b/html-test/tests/QuasiQuote.hs new file mode 100644 index 00000000..06762cf9 --- /dev/null +++ b/html-test/tests/QuasiQuote.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} + +-- example taken from the GHC documentation +module QuasiQuote where + +import QuasiExpr + +val :: Integer +val = eval [expr|1 + 2|] diff --git a/html-test/tests/QuasiQuote.html.ref b/html-test/tests/QuasiQuote.html.ref new file mode 100644 index 00000000..f61f2b84 --- /dev/null +++ b/html-test/tests/QuasiQuote.html.ref @@ -0,0 +1,65 @@ +<!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 + >QuasiQuote</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_QuasiQuote.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >QuasiQuote</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:val" class="def" + >val</a + > :: <a href="" + >Integer</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/TH.hs b/html-test/tests/TH.hs new file mode 100644 index 00000000..f8178bcb --- /dev/null +++ b/html-test/tests/TH.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TH where + +import Language.Haskell.TH + +decl :: Q [Dec] +decl = [d| f x = x|] diff --git a/html-test/tests/TH.html.ref b/html-test/tests/TH.html.ref new file mode 100644 index 00000000..086d6a4a --- /dev/null +++ b/html-test/tests/TH.html.ref @@ -0,0 +1,63 @@ +<!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 + >TH</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_TH.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >TH</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:decl" class="def" + >decl</a + > :: Q [Dec]</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/TH2.hs b/html-test/tests/TH2.hs new file mode 100644 index 00000000..ea85e547 --- /dev/null +++ b/html-test/tests/TH2.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskell #-} + +module TH2 where + +import TH + +$( decl ) diff --git a/html-test/tests/TH2.html.ref b/html-test/tests/TH2.html.ref new file mode 100644 index 00000000..4d4a8914 --- /dev/null +++ b/html-test/tests/TH2.html.ref @@ -0,0 +1,63 @@ +<!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 + >TH2</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_TH2.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >TH2</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: t -> t</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Test.hs b/html-test/tests/Test.hs new file mode 100644 index 00000000..d352f029 --- /dev/null +++ b/html-test/tests/Test.hs @@ -0,0 +1,422 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Test +-- Copyright : (c) Simon Marlow 2002 +-- License : BSD-style +-- +-- Maintainer : libraries@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- This module illustrates & tests most of the features of Haddock. +-- Testing references from the description: 'T', 'f', 'g', 'Visible.visible'. +-- +----------------------------------------------------------------------------- + +-- This is plain comment, ignored by Haddock. + +module Test ( + + -- Section headings are introduced with '-- *': + -- * Type declarations + + -- Subsection headings are introduced with '-- **' and so on. + -- ** Data types + T(..), T2, T3(..), T4(..), T5(..), T6(..), + N1(..), N2(..), N3(..), N4, N5(..), N6(..), N7(..), + + -- ** Records + R(..), R1(..), + + -- | test that we can export record selectors on their own: + p, q, u, + + -- * Class declarations + C(a,b), D(..), E, F(..), + + -- | Test that we can export a class method on its own: + a, + + -- * Function types + f, g, + + -- * Auxiliary stuff + + -- $aux1 + + -- $aux2 + + -- $aux3 + + -- $aux4 + + -- $aux5 + + -- $aux6 + + -- $aux7 + + -- $aux8 + + -- $aux9 + + -- $aux10 + + -- $aux11 + + -- $aux12 + + -- | This is some inline documentation in the export list + -- + -- > a code block using bird-tracks + -- > each line must begin with > (which isn't significant unless it + -- > is at the beginning of the line). + + -- * A hidden module + module Hidden, + + -- * A visible module + module Visible, + + {-| nested-style doc comments -} + + -- * Existential \/ Universal types + Ex(..), + + -- * Type signatures with argument docs + k, l, m, o, + + -- * A section + -- and without an intervening comma: + -- ** A subsection + +{-| + > a literal line + + $ a non /literal/ line $ +-} + + f', + + withType, withoutType + ) where + +import Hidden +import Visible +import Data.Maybe + +bla = Nothing + +-- | This comment applies to the /following/ declaration +-- and it continues until the next non-comment line +data T a b + = A Int (Maybe Float) -- ^ This comment describes the 'A' constructor + | -- | This comment describes the 'B' constructor + B (T a b, T Int Float) -- ^ + +-- | An abstract data declaration +data T2 a b = T2 a b + +-- | A data declaration with no documentation annotations on the constructors +data T3 a b = A1 a | B1 b + +-- A data declaration with no documentation annotations at all +data T4 a b = A2 a | B2 b + +-- A data declaration documentation on the constructors only +data T5 a b + = A3 a -- ^ documents 'A3' + | B3 b -- ^ documents 'B3' + +-- | Testing alternative comment styles +data T6 + -- | This is the doc for 'A4' + = A4 + | B4 + | -- ^ This is the doc for 'B4' + + -- | This is the doc for 'C4' + C4 + +-- | A newtype +newtype N1 a = N1 a + +-- | A newtype with a fieldname +newtype N2 a b = N2 {n :: a b} + +-- | A newtype with a fieldname, documentation on the field +newtype N3 a b = N3 {n3 :: a b -- ^ this is the 'n3' field + } + +-- | An abstract newtype - we show this one as data rather than newtype because +-- the difference isn\'t visible to the programmer for an abstract type. +newtype N4 a b = N4 a + +newtype N5 a b = N5 {n5 :: a b -- ^ no docs on the datatype or the constructor + } + +newtype N6 a b = N6 {n6 :: a b + } + -- ^ docs on the constructor only + +-- | docs on the newtype and the constructor +newtype N7 a b = N7 {n7 :: a b + } + -- ^ The 'N7' constructor + + +class (D a) => C a where + -- |this is a description of the 'a' method + a :: IO a + b :: [a] + -- ^ this is a description of the 'b' method + c :: a -- c is hidden in the export list + +-- ^ This comment applies to the /previous/ declaration (the 'C' class) + +class D a where + d :: T a b + e :: (a,a) +-- ^ This is a class declaration with no separate docs for the methods + +instance D Int where + d = undefined + e = undefined + +-- instance with a qualified class name +instance Test.D Float where + d = undefined + e = undefined + +class E a where + ee :: a +-- ^ This is a class declaration with no methods (or no methods exported) + +-- This is a class declaration with no documentation at all +class F a where + ff :: a + +-- | This is the documentation for the 'R' record, which has four fields, +-- 'p', 'q', 'r', and 's'. +data R = + -- | This is the 'C1' record constructor, with the following fields: + C1 { p :: Int -- ^ This comment applies to the 'p' field + , q :: forall a . a->a -- ^ This comment applies to the 'q' field + , -- | This comment applies to both 'r' and 's' + r,s :: Int + } + | C2 { t :: T1 -> (T2 Int Int)-> (T3 Bool Bool) -> (T4 Float Float) -> T5 () (), + u,v :: Int + } + -- ^ This is the 'C2' record constructor, also with some fields: + +-- | Testing different record commenting styles +data R1 + -- | This is the 'C3' record constructor + = C3 { + -- | The 's1' record selector + s1 :: Int + -- | The 's2' record selector + , s2 :: Int + , s3 :: Int -- NOTE: In the original examples/Test.hs in Haddock, there is an extra "," here. + -- Since GHC doesn't allow that, I have removed it in this file. + -- ^ The 's3' record selector + } + +-- These section headers are only used when there is no export list to +-- give the structure of the documentation: + +-- * This is a section header (level 1) +-- ** This is a section header (level 2) +-- *** This is a section header (level 3) + +{-| +In a comment string we can refer to identifiers in scope with +single quotes like this: 'T', and we can refer to modules by +using double quotes: "Foo". We can add emphasis /like this/. + + * This is a bulleted list + + - This is the next item (different kind of bullet) + + (1) This is an ordered list + + 2. This is the next item (different kind of bullet) + + [cat] a small, furry, domesticated mammal + + [pineapple] a fruit grown in the tropics + +@ + This is a block of code, which can include other markup: 'R' + formatting + is + significant +@ + +> this is another block of code + +We can also include URLs in documentation: <http://www.haskell.org/>. +-} + +f :: C a => a -> Int + +-- | we can export foreign declarations too +foreign import ccall g :: Int -> IO CInt + +-- | this doc string has a parse error in it: \' +h :: Int +h = 42 + + +-- $aux1 This is some documentation that is attached to a name ($aux1) +-- rather than a source declaration. The documentation may be +-- referred to in the export list using its name. +-- +-- @ code block in named doc @ + +-- $aux2 This is some documentation that is attached to a name ($aux2) + +-- $aux3 +-- @ code block on its own in named doc @ + +-- $aux4 +-- +-- @ code block on its own in named doc (after newline) @ + +{- $aux5 a nested, named doc comment + + with a paragraph, + + @ and a code block @ +-} + +-- some tests for various arrangements of code blocks: + +{- $aux6 +>test +>test1 + +@ test2 + test3 +@ +-} + +{- $aux7 +@ +test1 +test2 +@ +-} + +{- $aux8 +>test3 +>test4 +-} + +{- $aux9 +@ +test1 +test2 +@ + +>test3 +>test4 +-} + +{- $aux10 +>test3 +>test4 + +@ +test1 +test2 +@ +-} + +-- This one is currently wrong (Haddock 0.4). The @...@ part is +-- interpreted as part of the bird-tracked code block. +{- $aux11 +aux11: + +>test3 +>test4 + +@ +test1 +test2 +@ +-} + +-- $aux12 +-- > foo +-- +-- > bar +-- + +-- | A data-type using existential\/universal types +data Ex a + = forall b . C b => Ex1 b + | forall b . Ex2 b + | forall b . C a => Ex3 b -- NOTE: I have added "forall b" here make GHC accept this file + | Ex4 (forall a . a -> a) + +-- | This is a function with documentation for each argument +k :: T () () -- ^ This argument has type 'T' + -> (T2 Int Int) -- ^ This argument has type 'T2 Int Int' + -> (T3 Bool Bool -> T4 Float Float) -- ^ This argument has type @T3 Bool Bool -> T4 Float Float@ + -> T5 () () -- ^ This argument has a very long description that should + -- hopefully cause some wrapping to happen when it is finally + -- rendered by Haddock in the generated HTML page. + -> IO () -- ^ This is the result type + +-- This function has arg docs but no docs for the function itself +l :: (Int, Int, Float) -- ^ takes a triple + -> Int -- ^ returns an 'Int' + +-- | This function has some arg docs +m :: R + -> N1 () -- ^ one of the arguments + -> IO Int -- ^ and the return value + +-- | This function has some arg docs but not a return value doc + +-- can't use the original name ('n') with GHC +newn :: R -- ^ one of the arguments, an 'R' + -> N1 () -- ^ one of the arguments + -> IO Int +newn = undefined + + +-- | A foreign import with argument docs +foreign import ccall unsafe + o :: Float -- ^ The input float + -> IO Float -- ^ The output float + +-- | We should be able to escape this: \#\#\# + +-- p :: Int +-- can't use the above original definition with GHC +newp :: Int +newp = undefined + +-- | a function with a prime can be referred to as 'f'' +-- but f' doesn't get link'd 'f\'' +f' :: Int + +-- | Comment on a definition without type signature +withoutType = undefined + +-- | Comment on a definition with type signature +withType :: Int +withType = 1 + +-- Add some definitions here so that this file can be compiled with GHC + +data T1 +f = undefined +f' = undefined +type CInt = Int +k = undefined +l = undefined +m = undefined diff --git a/html-test/tests/Test.html.ref b/html-test/tests/Test.html.ref new file mode 100644 index 00000000..f2ef2b28 --- /dev/null +++ b/html-test/tests/Test.html.ref @@ -0,0 +1,2245 @@ +<!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 + >Test</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_Test.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Portability</th + ><td + >portable</td + ></tr + ><tr + ><th + >Stability</th + ><td + >provisional</td + ></tr + ><tr + ><th + >Maintainer</th + ><td + >libraries@haskell.org</td + ></tr + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Test</p + ></div + ><div id="table-of-contents" + ><p class="caption" + >Contents</p + ><ul + ><li + ><a href="" + >Type declarations +</a + ><ul + ><li + ><a href="" + >Data types +</a + ></li + ><li + ><a href="" + >Records +</a + ></li + ></ul + ></li + ><li + ><a href="" + >Class declarations +</a + ></li + ><li + ><a href="" + >Function types +</a + ></li + ><li + ><a href="" + >Auxiliary stuff +</a + ></li + ><li + ><a href="" + >A hidden module +</a + ></li + ><li + ><a href="" + >A visible module +</a + ></li + ><li + ><a href="" + >Existential / Universal types +</a + ></li + ><li + ><a href="" + >Type signatures with argument docs +</a + ></li + ><li + ><a href="" + >A section +</a + ><ul + ><li + ><a href="" + >A subsection +</a + ></li + ></ul + ></li + ></ul + ></div + ><div id="description" + ><p class="caption" + >Description</p + ><div class="doc" + ><p + >This module illustrates & tests most of the features of Haddock. + Testing references from the description: <code + ><a href="" + >T</a + ></code + >, <code + ><a href="" + >f</a + ></code + >, <code + ><a href="" + >g</a + ></code + >, <code + ><a href="" + >visible</a + ></code + >. +</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" + ><span class="keyword" + >data</span + > <a href="" + >T</a + > a b<ul class="subs" + ><li + >= <a href="" + >A</a + > <a href="" + >Int</a + > (<a href="" + >Maybe</a + > <a href="" + >Float</a + >) </li + ><li + >| <a href="" + >B</a + > (<a href="" + >T</a + > a b, <a href="" + >T</a + > <a href="" + >Int</a + > <a href="" + >Float</a + >) </li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >T2</a + > a b</li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >T3</a + > a b<ul class="subs" + ><li + >= <a href="" + >A1</a + > a </li + ><li + >| <a href="" + >B1</a + > b </li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >T4</a + > a b<ul class="subs" + ><li + >= <a href="" + >A2</a + > a </li + ><li + >| <a href="" + >B2</a + > b </li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >T5</a + > a b<ul class="subs" + ><li + >= <a href="" + >A3</a + > a </li + ><li + >| <a href="" + >B3</a + > b </li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >T6</a + > <ul class="subs" + ><li + >= <a href="" + >A4</a + > </li + ><li + >| <a href="" + >B4</a + > </li + ><li + >| <a href="" + >C4</a + > </li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >N1</a + > a = <a href="" + >N1</a + > a</li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >N2</a + > a b = <a href="" + >N2</a + > {<ul class="subs" + ><li + ><a href="" + >n</a + > :: a b</li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >N3</a + > a b = <a href="" + >N3</a + > {<ul class="subs" + ><li + ><a href="" + >n3</a + > :: a b</li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >N4</a + > a b</li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >N5</a + > a b = <a href="" + >N5</a + > {<ul class="subs" + ><li + ><a href="" + >n5</a + > :: a b</li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >N6</a + > a b = <a href="" + >N6</a + > {<ul class="subs" + ><li + ><a href="" + >n6</a + > :: a b</li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >N7</a + > a b = <a href="" + >N7</a + > {<ul class="subs" + ><li + ><a href="" + >n7</a + > :: a b</li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >R</a + > <ul class="subs" + ><li + >= <a href="" + >C1</a + > { <ul class="subs" + ><li + ><a href="" + >p</a + > :: <a href="" + >Int</a + ></li + ><li + ><a href="" + >q</a + > :: <span class="keyword" + >forall</span + > a. a -> a</li + ><li + ><a href="" + >r</a + > :: <a href="" + >Int</a + ></li + ><li + ><a href="" + >s</a + > :: <a href="" + >Int</a + ></li + ></ul + > }</li + ><li + >| <a href="" + >C2</a + > { <ul class="subs" + ><li + ><a href="" + >t</a + > :: T1 -> <a href="" + >T2</a + > <a href="" + >Int</a + > <a href="" + >Int</a + > -> <a href="" + >T3</a + > <a href="" + >Bool</a + > <a href="" + >Bool</a + > -> <a href="" + >T4</a + > <a href="" + >Float</a + > <a href="" + >Float</a + > -> <a href="" + >T5</a + > () ()</li + ><li + ><a href="" + >u</a + > :: <a href="" + >Int</a + ></li + ><li + ><a href="" + >v</a + > :: <a href="" + >Int</a + ></li + ></ul + > }</li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >R1</a + > = <a href="" + >C3</a + > {<ul class="subs" + ><li + ><a href="" + >s1</a + > :: <a href="" + >Int</a + ></li + ><li + ><a href="" + >s2</a + > :: <a href="" + >Int</a + ></li + ><li + ><a href="" + >s3</a + > :: <a href="" + >Int</a + ></li + ></ul + >}</li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >D</a + > a => <a href="" + >C</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >a</a + > :: <a href="" + >IO</a + > a</li + ><li + ><a href="" + >b</a + > :: [a]</li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >D</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >d</a + > :: <a href="" + >T</a + > a b</li + ><li + ><a href="" + >e</a + > :: (a, a)</li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >E</a + > a </li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >F</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><a href="" + >ff</a + > :: a</li + ></ul + ></li + ><li class="src short" + ><a href="" + >f</a + > :: <a href="" + >C</a + > a => a -> <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >g</a + > :: <a href="" + >Int</a + > -> <a href="" + >IO</a + > CInt</li + ><li class="src short" + ><a href="" + >hidden</a + > :: <a href="" + >Int</a + > -> <a href="" + >Int</a + ></li + ><li class="src short" + >module <a href="" + >Visible</a + ></li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >Ex</a + > a<ul class="subs" + ><li + >= <span class="keyword" + >forall</span + > b . <a href="" + >C</a + > b => <a href="" + >Ex1</a + > b </li + ><li + >| <span class="keyword" + >forall</span + > b . <a href="" + >Ex2</a + > b </li + ><li + >| <span class="keyword" + >forall</span + > b . <a href="" + >C</a + > a => <a href="" + >Ex3</a + > b </li + ><li + >| <a href="" + >Ex4</a + > (<span class="keyword" + >forall</span + > a. a -> a) </li + ></ul + ></li + ><li class="src short" + ><a href="" + >k</a + > :: <a href="" + >T</a + > () () -> <a href="" + >T2</a + > <a href="" + >Int</a + > <a href="" + >Int</a + > -> (<a href="" + >T3</a + > <a href="" + >Bool</a + > <a href="" + >Bool</a + > -> <a href="" + >T4</a + > <a href="" + >Float</a + > <a href="" + >Float</a + >) -> <a href="" + >T5</a + > () () -> <a href="" + >IO</a + > ()</li + ><li class="src short" + ><a href="" + >l</a + > :: (<a href="" + >Int</a + >, <a href="" + >Int</a + >, <a href="" + >Float</a + >) -> <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >m</a + > :: <a href="" + >R</a + > -> <a href="" + >N1</a + > () -> <a href="" + >IO</a + > <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >o</a + > :: <a href="" + >Float</a + > -> <a href="" + >IO</a + > <a href="" + >Float</a + ></li + ><li class="src short" + ><a href="" + >f'</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >withType</a + > :: <a href="" + >Int</a + ></li + ><li class="src short" + ><a href="" + >withoutType</a + > :: a</li + ></ul + ></div + ><div id="interface" + ><h1 id="g:1" + >Type declarations +</h1 + ><h2 id="g:2" + >Data types +</h2 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T" class="def" + >T</a + > a b </p + ><div class="doc" + ><p + >This comment applies to the <em + >following</em + > declaration + and it continues until the next non-comment line +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A" class="def" + >A</a + > <a href="" + >Int</a + > (<a href="" + >Maybe</a + > <a href="" + >Float</a + >)</td + ><td class="doc" + ><p + >This comment describes the <code + ><a href="" + >A</a + ></code + > constructor +</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:B" class="def" + >B</a + > (<a href="" + >T</a + > a b, <a href="" + >T</a + > <a href="" + >Int</a + > <a href="" + >Float</a + >)</td + ><td class="doc" + ><p + >This comment describes the <code + ><a href="" + >B</a + ></code + > constructor +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T2" class="def" + >T2</a + > a b </p + ><div class="doc" + ><p + >An abstract data declaration +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T3" class="def" + >T3</a + > a b </p + ><div class="doc" + ><p + >A data declaration with no documentation annotations on the constructors +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A1" class="def" + >A1</a + > a</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:B1" class="def" + >B1</a + > b</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T4" class="def" + >T4</a + > a b </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A2" class="def" + >A2</a + > a</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:B2" class="def" + >B2</a + > b</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T5" class="def" + >T5</a + > a b </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A3" class="def" + >A3</a + > a</td + ><td class="doc" + ><p + >documents <code + ><a href="" + >A3</a + ></code + > +</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:B3" class="def" + >B3</a + > b</td + ><td class="doc" + ><p + >documents <code + ><a href="" + >B3</a + ></code + > +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:T6" class="def" + >T6</a + > </p + ><div class="doc" + ><p + >Testing alternative comment styles +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:A4" class="def" + >A4</a + ></td + ><td class="doc" + ><p + >This is the doc for <code + ><a href="" + >A4</a + ></code + > +</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:B4" class="def" + >B4</a + ></td + ><td class="doc" + ><p + >This is the doc for <code + ><a href="" + >B4</a + ></code + > +</p + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:C4" class="def" + >C4</a + ></td + ><td class="doc" + ><p + >This is the doc for <code + ><a href="" + >C4</a + ></code + > +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:N1" class="def" + >N1</a + > a </p + ><div class="doc" + ><p + >A newtype +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:N1" class="def" + >N1</a + > a</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:N2" class="def" + >N2</a + > a b </p + ><div class="doc" + ><p + >A newtype with a fieldname +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:N2" class="def" + >N2</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:N3" class="def" + >N3</a + > a b </p + ><div class="doc" + ><p + >A newtype with a fieldname, documentation on the field +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:N3" class="def" + >N3</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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 + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:N4" class="def" + >N4</a + > a b </p + ><div class="doc" + ><p + >An abstract newtype - we show this one as data rather than newtype because + the difference isn't visible to the programmer for an abstract type. +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:N5" class="def" + >N5</a + > a b </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:N5" class="def" + >N5</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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 + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:N6" class="def" + >N6</a + > a b </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:N6" class="def" + >N6</a + ></td + ><td class="doc" + ><p + >docs on the constructor only +</p + ></td + ></tr + ><tr + ><td colspan="2" + ><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" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:N7" class="def" + >N7</a + > a b </p + ><div class="doc" + ><p + >docs on the newtype and the constructor +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:N7" class="def" + >N7</a + ></td + ><td class="doc" + ><p + >The <code + ><a href="" + >N7</a + ></code + > constructor +</p + ></td + ></tr + ><tr + ><td colspan="2" + ><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" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><h2 id="g:3" + >Records +</h2 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:R" class="def" + >R</a + > </p + ><div class="doc" + ><p + >This is the documentation for the <code + ><a href="" + >R</a + ></code + > record, which has four fields, + <code + ><a href="" + >p</a + ></code + >, <code + ><a href="" + >q</a + ></code + >, <code + ><a href="" + >r</a + ></code + >, and <code + ><a href="" + >s</a + ></code + >. +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:C1" class="def" + >C1</a + ></td + ><td class="doc" + ><p + >This is the <code + ><a href="" + >C1</a + ></code + > record constructor, with the following fields: +</p + ></td + ></tr + ><tr + ><td colspan="2" + ><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 -> 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 + ></div + ></td + ></tr + ><tr + ><td class="src" + ><a name="v:C2" class="def" + >C2</a + ></td + ><td class="doc" + ><p + >This is the <code + ><a href="" + >C2</a + ></code + > record constructor, also with some fields: +</p + ></td + ></tr + ><tr + ><td colspan="2" + ><div class="subs fields" + ><p class="caption" + >Fields</p + ><dl + ><dt class="src" + ><a name="v:t" class="def" + >t</a + > :: T1 -> <a href="" + >T2</a + > <a href="" + >Int</a + > <a href="" + >Int</a + > -> <a href="" + >T3</a + > <a href="" + >Bool</a + > <a href="" + >Bool</a + > -> <a href="" + >T4</a + > <a href="" + >Float</a + > <a href="" + >Float</a + > -> <a href="" + >T5</a + > () ()</dt + ><dd class="doc empty" + > </dd + ><dt class="src" + ><a name="v:u" class="def" + >u</a + > :: <a href="" + >Int</a + ></dt + ><dd class="doc empty" + > </dd + ><dt class="src" + ><a name="v:v" class="def" + >v</a + > :: <a href="" + >Int</a + ></dt + ><dd class="doc empty" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:R1" class="def" + >R1</a + > </p + ><div class="doc" + ><p + >Testing different record commenting styles +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:C3" class="def" + >C3</a + ></td + ><td class="doc" + ><p + >This is the <code + ><a href="" + >C3</a + ></code + > record constructor +</p + ></td + ></tr + ><tr + ><td colspan="2" + ><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 + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="doc" + ><p + >test that we can export record selectors on their own: +</p + ></div + ><h1 id="g:4" + >Class declarations +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" + >D</a + > a => <a name="t:C" class="def" + >C</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><p + >This comment applies to the <em + >previous</em + > declaration (the <code + ><a href="" + >C</a + ></code + > class) +</p + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:a" class="def" + >a</a + > :: <a href="" + >IO</a + > a</p + ><div class="doc" + ><p + >this is a description of the <code + ><a href="" + >a</a + ></code + > method +</p + ></div + ><p class="src" + ><a name="v:b" class="def" + >b</a + > :: [a]</p + ><div class="doc" + ><p + >this is a description of the <code + ><a href="" + >b</a + ></code + > method +</p + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:D" class="def" + >D</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><p + >This is a class declaration with no separate docs for the methods +</p + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:d" class="def" + >d</a + > :: <a href="" + >T</a + > a b</p + ><p class="src" + ><a name="v:e" class="def" + >e</a + > :: (a, a)</p + ></div + ><div class="subs instances" + ><p id="control.i:D" class="caption collapser" onclick="toggleSection('i:D')" + >Instances</p + ><div id="section.i:D" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >D</a + > <a href="" + >Float</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a href="" + >D</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:E" class="def" + >E</a + > a </p + ><div class="doc" + ><p + >This is a class declaration with no methods (or no methods exported) +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:F" class="def" + >F</a + > a <span class="keyword" + >where</span + ></p + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:ff" class="def" + >ff</a + > :: a</p + ></div + ></div + ><div class="doc" + ><p + >Test that we can export a class method on its own: +</p + ></div + ><h1 id="g:5" + >Function types +</h1 + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: <a href="" + >C</a + > a => a -> <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >In a comment string we can refer to identifiers in scope with +single quotes like this: <code + ><a href="" + >T</a + ></code + >, and we can refer to modules by +using double quotes: <a href="" + >Foo</a + >. We can add emphasis <em + >like this</em + >. +</p + ><ul + ><li + > This is a bulleted list +</li + ><li + > This is the next item (different kind of bullet) +</li + ></ul + ><ol + ><li + > This is an ordered list +</li + ><li + > This is the next item (different kind of bullet) +</li + ></ol + ><dl + ><dt + >cat</dt + ><dd + > a small, furry, domesticated mammal +</dd + ><dt + >pineapple</dt + ><dd + > a fruit grown in the tropics +</dd + ></dl + ><pre + > + This is a block of code, which can include other markup: <code + ><a href="" + >R</a + ></code + > + formatting + is + significant +</pre + ><pre + > this is another block of code +</pre + ><p + >We can also include URLs in documentation: <a href="" + >http://www.haskell.org/</a + >. +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:g" class="def" + >g</a + > :: <a href="" + >Int</a + > -> <a href="" + >IO</a + > CInt</p + ><div class="doc" + ><p + >we can export foreign declarations too +</p + ></div + ></div + ><h1 id="g:6" + >Auxiliary stuff +</h1 + ><div class="doc" + ><p + >This is some documentation that is attached to a name ($aux1) + rather than a source declaration. The documentation may be + referred to in the export list using its name. +</p + ><pre + > code block in named doc</pre + ></div + ><div class="doc" + ><p + >This is some documentation that is attached to a name ($aux2) +</p + ></div + ><div class="doc" + ><pre + > code block on its own in named doc</pre + ></div + ><div class="doc" + ><pre + > code block on its own in named doc (after newline)</pre + ></div + ><div class="doc" + ><p + >a nested, named doc comment +</p + ><p + >with a paragraph, +</p + ><pre + > and a code block</pre + ></div + ><div class="doc" + ><pre + >test +test1 +</pre + ><pre + > test2 + test3 +</pre + ></div + ><div class="doc" + ><pre + > +test1 +test2 +</pre + ></div + ><div class="doc" + ><pre + >test3 +test4 +</pre + ></div + ><div class="doc" + ><pre + > +test1 +test2 +</pre + ><pre + >test3 +test4 +</pre + ></div + ><div class="doc" + ><pre + >test3 +test4 +</pre + ><pre + > +test1 +test2 +</pre + ></div + ><div class="doc" + ><p + >aux11: +</p + ><pre + >test3 +test4 +</pre + ><pre + > +test1 +test2 +</pre + ></div + ><div class="doc" + ><pre + > foo +</pre + ><pre + > bar +</pre + ></div + ><div class="doc" + ><p + >This is some inline documentation in the export list +</p + ><pre + > a code block using bird-tracks + each line must begin with > (which isn't significant unless it + is at the beginning of the line). +</pre + ></div + ><h1 id="g:7" + >A hidden module +</h1 + ><div class="top" + ><p class="src" + ><a name="v:hidden" class="def" + >hidden</a + > :: <a href="" + >Int</a + > -> <a href="" + >Int</a + ></p + ></div + ><h1 id="g:8" + >A visible module +</h1 + ><div class="top" + ><p class="src" + >module <a href="" + >Visible</a + ></p + ></div + ><div class="doc" + ><p + >nested-style doc comments +</p + ></div + ><h1 id="g:9" + >Existential / Universal types +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Ex" class="def" + >Ex</a + > a </p + ><div class="doc" + ><p + >A data-type using existential/universal types +</p + ></div + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><span class="keyword" + >forall</span + > b . <a href="" + >C</a + > b => <a name="v:Ex1" class="def" + >Ex1</a + > b</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >forall</span + > b . <a name="v:Ex2" class="def" + >Ex2</a + > b</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><span class="keyword" + >forall</span + > b . <a href="" + >C</a + > a => <a name="v:Ex3" class="def" + >Ex3</a + > b</td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + ><a name="v:Ex4" class="def" + >Ex4</a + > (<span class="keyword" + >forall</span + > a. a -> a)</td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><h1 id="g:10" + >Type signatures with argument docs +</h1 + ><div class="top" + ><p class="src" + ><a name="v:k" class="def" + >k</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: <a href="" + >T</a + > () ()</td + ><td class="doc" + ><p + >This argument has type <code + ><a href="" + >T</a + ></code + > +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >T2</a + > <a href="" + >Int</a + > <a href="" + >Int</a + ></td + ><td class="doc" + ><p + >This argument has type 'T2 Int Int' +</p + ></td + ></tr + ><tr + ><td class="src" + >-> (<a href="" + >T3</a + > <a href="" + >Bool</a + > <a href="" + >Bool</a + > -> <a href="" + >T4</a + > <a href="" + >Float</a + > <a href="" + >Float</a + >)</td + ><td class="doc" + ><p + >This argument has type <code + >T3 Bool Bool -> T4 Float Float</code + > +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >T5</a + > () ()</td + ><td class="doc" + ><p + >This argument has a very long description that should + hopefully cause some wrapping to happen when it is finally + rendered by Haddock in the generated HTML page. +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >IO</a + > ()</td + ><td class="doc" + ><p + >This is the result type +</p + ></td + ></tr + ></table + ></div + ><div class="doc" + ><p + >This is a function with documentation for each argument +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:l" class="def" + >l</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: (<a href="" + >Int</a + >, <a href="" + >Int</a + >, <a href="" + >Float</a + >)</td + ><td class="doc" + ><p + >takes a triple +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >Int</a + ></td + ><td class="doc" + ><p + >returns an <code + ><a href="" + >Int</a + ></code + > +</p + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:m" class="def" + >m</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: <a href="" + >R</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >N1</a + > ()</td + ><td class="doc" + ><p + >one of the arguments +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >IO</a + > <a href="" + >Int</a + ></td + ><td class="doc" + ><p + >and the return value +</p + ></td + ></tr + ></table + ></div + ><div class="doc" + ><p + >This function has some arg docs +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:o" class="def" + >o</a + ></p + ><div class="subs arguments" + ><p class="caption" + >Arguments</p + ><table + ><tr + ><td class="src" + >:: <a href="" + >Float</a + ></td + ><td class="doc" + ><p + >The input float +</p + ></td + ></tr + ><tr + ><td class="src" + >-> <a href="" + >IO</a + > <a href="" + >Float</a + ></td + ><td class="doc" + ><p + >The output float +</p + ></td + ></tr + ></table + ></div + ><div class="doc" + ><p + >A foreign import with argument docs +</p + ></div + ></div + ><h1 id="g:11" + >A section +</h1 + ><h2 id="g:12" + >A subsection +</h2 + ><div class="doc" + ><pre + > a literal line +</pre + ><p + >$ a non <em + >literal</em + > line $ +</p + ></div + ><div class="top" + ><p class="src" + ><a name="v:f-39-" class="def" + >f'</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >a function with a prime can be referred to as <code + ><a href="" + >f'</a + ></code + > + but f' doesn't get link'd 'f\'' +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:withType" class="def" + >withType</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >Comment on a definition with type signature +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:withoutType" class="def" + >withoutType</a + > :: a</p + ><div class="doc" + ><p + >Comment on a definition without type signature +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Ticket112.hs b/html-test/tests/Ticket112.hs new file mode 100644 index 00000000..c9cd5117 --- /dev/null +++ b/html-test/tests/Ticket112.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE MagicHash #-} + +module Ticket112 where + +import GHC.Prim + +-- | ...given a raw 'Addr#' to the string, and the length of the string. +f :: a +f = undefined diff --git a/html-test/tests/Ticket112.html.ref b/html-test/tests/Ticket112.html.ref new file mode 100644 index 00000000..c5c61703 --- /dev/null +++ b/html-test/tests/Ticket112.html.ref @@ -0,0 +1,82 @@ +<!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 + >Ticket112</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_Ticket112.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Ticket112</p + ></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="" + >f</a + > :: a</li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: a</p + ><div class="doc" + ><p + >...given a raw <code + ><a href="" + >Addr#</a + ></code + > to the string, and the length of the string. +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Ticket61.hs b/html-test/tests/Ticket61.hs new file mode 100644 index 00000000..26ca287f --- /dev/null +++ b/html-test/tests/Ticket61.hs @@ -0,0 +1,3 @@ +module Ticket61 (module Ticket61_Hidden) where + +import Ticket61_Hidden diff --git a/html-test/tests/Ticket61.html.ref b/html-test/tests/Ticket61.html.ref new file mode 100644 index 00000000..8c22488b --- /dev/null +++ b/html-test/tests/Ticket61.html.ref @@ -0,0 +1,80 @@ +<!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 + >Ticket61</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_Ticket61.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Ticket61</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:C" class="def" + >C</a + > a <span class="keyword" + >where</span + ></p + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: a</p + ><div class="doc" + ><p + >A comment about f +</p + ></div + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Ticket61_Hidden.hs b/html-test/tests/Ticket61_Hidden.hs new file mode 100644 index 00000000..583c10cd --- /dev/null +++ b/html-test/tests/Ticket61_Hidden.hs @@ -0,0 +1,7 @@ +{-# OPTIONS_HADDOCK hide #-} + +module Ticket61_Hidden where + +class C a where + -- | A comment about f + f :: a diff --git a/html-test/tests/Ticket75.hs b/html-test/tests/Ticket75.hs new file mode 100644 index 00000000..94a2f115 --- /dev/null +++ b/html-test/tests/Ticket75.hs @@ -0,0 +1,7 @@ +module Ticket75 where + +data a :- b = Q + +-- | A reference to ':-' +f :: Int +f = undefined diff --git a/html-test/tests/Ticket75.html.ref b/html-test/tests/Ticket75.html.ref new file mode 100644 index 00000000..cd510ea5 --- /dev/null +++ b/html-test/tests/Ticket75.html.ref @@ -0,0 +1,116 @@ +<!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 + >Ticket75</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_Ticket75.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Ticket75</p + ></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" + ><span class="keyword" + >data</span + > a <a href="" + >:-</a + > b = <a href="" + >Q</a + ></li + ><li class="src short" + ><a href="" + >f</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > a <a name="t::-45-" class="def" + >:-</a + > b </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:Q" class="def" + >Q</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >A reference to <code + ><a href="" + >:-</a + ></code + > +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/TypeFamilies.hs b/html-test/tests/TypeFamilies.hs new file mode 100644 index 00000000..561f95fd --- /dev/null +++ b/html-test/tests/TypeFamilies.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE TypeFamilies #-} + +module TypeFamilies where + +-- | Type family G +type family G a :: * + +-- | A class with an associated type +class A a where + -- | An associated type + data B a :: * -> * + -- | A method + f :: B a Int + +-- | Doc for family +type family F a + + +-- | Doc for G Int +type instance G Int = Bool +type instance G Float = Int + + +instance A Int where + data B Int x = Con x + f = Con 3 + +g = Con 5 diff --git a/html-test/tests/TypeFamilies.html.ref b/html-test/tests/TypeFamilies.html.ref new file mode 100644 index 00000000..196d60ec --- /dev/null +++ b/html-test/tests/TypeFamilies.html.ref @@ -0,0 +1,212 @@ +<!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 + >TypeFamilies</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_TypeFamilies.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >TypeFamilies</p + ></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" + ><span class="keyword" + >type family</span + > <a href="" + >G</a + > a :: *</li + ><li class="src short" + ><span class="keyword" + >class</span + > <a href="" + >A</a + > a <span class="keyword" + >where</span + ><ul class="subs" + ><li + ><span class="keyword" + >data</span + > <a href="" + >B</a + > a :: * -> *</li + ><li + ><a href="" + >f</a + > :: <a href="" + >B</a + > a <a href="" + >Int</a + ></li + ></ul + ></li + ><li class="src short" + ><span class="keyword" + >type family</span + > <a href="" + >F</a + > a </li + ><li class="src short" + ><a href="" + >g</a + > :: <a href="" + >B</a + > <a href="" + >Int</a + > <a href="" + >Integer</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >type family</span + > <a name="t:G" class="def" + >G</a + > a :: *</p + ><div class="doc" + ><p + >Type family G +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a name="t:A" class="def" + >A</a + > a <span class="keyword" + >where</span + ></p + ><div class="doc" + ><p + >A class with an associated type +</p + ></div + ><div class="subs associated-types" + ><p class="caption" + >Associated Types</p + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:B" class="def" + >B</a + > a :: * -> *</p + ><div class="doc" + ><p + >An associated type +</p + ></div + ></div + ><div class="subs methods" + ><p class="caption" + >Methods</p + ><p class="src" + ><a name="v:f" class="def" + >f</a + > :: <a href="" + >B</a + > a <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >A method +</p + ></div + ></div + ><div class="subs instances" + ><p id="control.i:A" class="caption collapser" onclick="toggleSection('i:A')" + >Instances</p + ><div id="section.i:A" class="show" + ><table + ><tr + ><td class="src" + ><a href="" + >A</a + > <a href="" + >Int</a + ></td + ><td class="doc empty" + > </td + ></tr + ></table + ></div + ></div + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >type family</span + > <a name="t:F" class="def" + >F</a + > a </p + ><div class="doc" + ><p + >Doc for family +</p + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:g" class="def" + >g</a + > :: <a href="" + >B</a + > <a href="" + >Int</a + > <a href="" + >Integer</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/TypeOperators.hs b/html-test/tests/TypeOperators.hs new file mode 100644 index 00000000..edbb9344 --- /dev/null +++ b/html-test/tests/TypeOperators.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE TypeOperators #-} +module TypeOperators ( + -- * stuff + (:-:), + (:+:), + Op, + O(..), + biO, +) where + +data a :-: b + +data (a :+: b) c + +data a `Op` b + +newtype (g `O` f) a = O { unO :: g (f a) } + +biO :: (g `O` f) a +biO = undefined diff --git a/html-test/tests/TypeOperators.html.ref b/html-test/tests/TypeOperators.html.ref new file mode 100644 index 00000000..2b18727f --- /dev/null +++ b/html-test/tests/TypeOperators.html.ref @@ -0,0 +1,185 @@ +<!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 + >TypeOperators</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_TypeOperators.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >TypeOperators</p + ></div + ><div id="table-of-contents" + ><p class="caption" + >Contents</p + ><ul + ><li + ><a href="" + >stuff +</a + ></li + ></ul + ></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" + ><span class="keyword" + >data</span + > a <a href="" + >:-:</a + > b</li + ><li class="src short" + ><span class="keyword" + >data</span + > (a <a href="" + >:+:</a + > b) c</li + ><li class="src short" + ><span class="keyword" + >data</span + > <a href="" + >Op</a + > a b</li + ><li class="src short" + ><span class="keyword" + >newtype</span + > <a href="" + >O</a + > g f a = <a href="" + >O</a + > {<ul class="subs" + ><li + ><a href="" + >unO</a + > :: g (f a)</li + ></ul + >}</li + ><li class="src short" + ><a href="" + >biO</a + > :: (g `<a href="" + >O</a + >` f) a</li + ></ul + ></div + ><div id="interface" + ><h1 id="g:1" + >stuff +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > a <a name="t::-45-:" class="def" + >:-:</a + > b </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > (a <a name="t::-43-:" class="def" + >:+:</a + > b) c </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a name="t:Op" class="def" + >Op</a + > a b </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >newtype</span + > <a name="t:O" class="def" + >O</a + > g f a </p + ><div class="subs constructors" + ><p class="caption" + >Constructors</p + ><table + ><tr + ><td class="src" + ><a name="v:O" class="def" + >O</a + ></td + ><td class="doc empty" + > </td + ></tr + ><tr + ><td colspan="2" + ><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" + > </dd + ></dl + ><div class="clear" + ></div + ></div + ></td + ></tr + ></table + ></div + ></div + ><div class="top" + ><p class="src" + ><a name="v:biO" class="def" + >biO</a + > :: (g `<a href="" + >O</a + >` f) a</p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Unicode.hs.disabled b/html-test/tests/Unicode.hs.disabled new file mode 100644 index 00000000..d5bbf445 --- /dev/null +++ b/html-test/tests/Unicode.hs.disabled @@ -0,0 +1,6 @@ +module Unicode where + +-- | γλώσσα +x :: Int +x = 1 + diff --git a/html-test/tests/Unicode.html.ref b/html-test/tests/Unicode.html.ref new file mode 100644 index 00000000..13ef6c1e --- /dev/null +++ b/html-test/tests/Unicode.html.ref @@ -0,0 +1,82 @@ +<!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 + >Unicode</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_Unicode.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Unicode</p + ></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="" + >x</a + > :: <a href="" + >Int</a + ></li + ></ul + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:x" class="def" + >x</a + > :: <a href="" + >Int</a + ></p + ><div class="doc" + ><p + >γλώσσα +</p + ></div + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/Visible.hs b/html-test/tests/Visible.hs new file mode 100644 index 00000000..cad71931 --- /dev/null +++ b/html-test/tests/Visible.hs @@ -0,0 +1,3 @@ +module Visible where +visible :: Int -> Int +visible a = a diff --git a/html-test/tests/Visible.html.ref b/html-test/tests/Visible.html.ref new file mode 100644 index 00000000..de8b8d80 --- /dev/null +++ b/html-test/tests/Visible.html.ref @@ -0,0 +1,67 @@ +<!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 + >Visible</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_Visible.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" + > </p + ></div + ><div id="content" + ><div id="module-header" + ><table class="info" + ><tr + ><th + >Safe Haskell</th + ><td + >None</td + ></tr + ></table + ><p class="caption" + >Visible</p + ></div + ><div id="interface" + ><h1 + >Documentation</h1 + ><div class="top" + ><p class="src" + ><a name="v:visible" class="def" + >visible</a + > :: <a href="" + >Int</a + > -> <a href="" + >Int</a + ></p + ></div + ></div + ></div + ><div id="footer" + ><p + >Produced by <a href="" + >Haddock</a + > version 2.13.1</p + ></div + ></body + ></html +> diff --git a/html-test/tests/frames.html.ref b/html-test/tests/frames.html.ref new file mode 100644 index 00000000..1b4e38d4 --- /dev/null +++ b/html-test/tests/frames.html.ref @@ -0,0 +1,30 @@ +<!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"> +<head> +<title></title> +<script src="haddock-util.js" type="text/javascript"></script> +<script type="text/javascript"><!-- +/* + + The synopsis frame needs to be updated using javascript, so we hide + it by default and only show it if javascript is enabled. + + TODO: provide some means to disable it. +*/ +function load() { + var d = document.getElementById("inner-fs"); + d.rows = "50%,50%"; + postReframe(); +} +--></script> +</head> +<frameset id="outer-fs" cols="25%,75%" onload="load()"> + <frameset id="inner-fs" rows="100%,0%"> + <frame src="index-frames.html" name="modules" /> + <frame src="" name="synopsis" /> + </frameset> + <frame src="index.html" name="main" /> +</frameset> +</html> diff --git a/html-test/tests/mini_A.html.ref b/html-test/tests/mini_A.html.ref new file mode 100644 index 00000000..cbe50e41 --- /dev/null +++ b/html-test/tests/mini_A.html.ref @@ -0,0 +1,59 @@ +<!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 + >A</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >A</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >A</a + > </p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >other</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >test2</a + ></p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >X</a + > </p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >reExport</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_AdvanceTypes.html.ref b/html-test/tests/mini_AdvanceTypes.html.ref new file mode 100644 index 00000000..59d8dcb1 --- /dev/null +++ b/html-test/tests/mini_AdvanceTypes.html.ref @@ -0,0 +1,33 @@ +<!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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >AdvanceTypes</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Pattern</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_B.html.ref b/html-test/tests/mini_B.html.ref new file mode 100644 index 00000000..211a7deb --- /dev/null +++ b/html-test/tests/mini_B.html.ref @@ -0,0 +1,45 @@ +<!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 + >B</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >B</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >test</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >reExport</a + ></p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >X</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug1.html.ref b/html-test/tests/mini_Bug1.html.ref new file mode 100644 index 00000000..adf81c73 --- /dev/null +++ b/html-test/tests/mini_Bug1.html.ref @@ -0,0 +1,33 @@ +<!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 + >Bug1</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug1</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug2.html.ref b/html-test/tests/mini_Bug2.html.ref new file mode 100644 index 00000000..b673e459 --- /dev/null +++ b/html-test/tests/mini_Bug2.html.ref @@ -0,0 +1,31 @@ +<!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 + >Bug2</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug2</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >x</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug3.html.ref b/html-test/tests/mini_Bug3.html.ref new file mode 100644 index 00000000..af4cc445 --- /dev/null +++ b/html-test/tests/mini_Bug3.html.ref @@ -0,0 +1,31 @@ +<!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 + >Bug3</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug3</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug4.html.ref b/html-test/tests/mini_Bug4.html.ref new file mode 100644 index 00000000..b403e94a --- /dev/null +++ b/html-test/tests/mini_Bug4.html.ref @@ -0,0 +1,31 @@ +<!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 + >Bug4</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug4</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug6.html.ref b/html-test/tests/mini_Bug6.html.ref new file mode 100644 index 00000000..5c5c1119 --- /dev/null +++ b/html-test/tests/mini_Bug6.html.ref @@ -0,0 +1,65 @@ +<!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 + >Bug6</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug6</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >A</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >B</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >C</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >D</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >E</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug7.html.ref b/html-test/tests/mini_Bug7.html.ref new file mode 100644 index 00000000..1bec82ee --- /dev/null +++ b/html-test/tests/mini_Bug7.html.ref @@ -0,0 +1,41 @@ +<!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 + >Bug7</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug7</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Foo</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >Bar</a + > x y</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bug8.html.ref b/html-test/tests/mini_Bug8.html.ref new file mode 100644 index 00000000..070dbcf8 --- /dev/null +++ b/html-test/tests/mini_Bug8.html.ref @@ -0,0 +1,63 @@ +<!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 + >Bug8</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bug8</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Typ</a + > </p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >(-->)</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >(--->)</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >s</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >t</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >main</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_BugDeprecated.html.ref b/html-test/tests/mini_BugDeprecated.html.ref new file mode 100644 index 00000000..f0410137 --- /dev/null +++ b/html-test/tests/mini_BugDeprecated.html.ref @@ -0,0 +1,61 @@ +<!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 + >BugDeprecated</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >BugDeprecated</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >baz</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >bar</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >one</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >three</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >two</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_BugExportHeadings.html.ref b/html-test/tests/mini_BugExportHeadings.html.ref new file mode 100644 index 00000000..b481720d --- /dev/null +++ b/html-test/tests/mini_BugExportHeadings.html.ref @@ -0,0 +1,79 @@ +<!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 + >BugExportHeadings</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >BugExportHeadings</p + ></div + ><div id="interface" + ><h1 + >Foo +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ><h1 + >Bar +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >bar</a + ></p + ></div + ><h1 + >Baz +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >baz</a + ></p + ></div + ><h1 + >One +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >one</a + ></p + ></div + ><h1 + >Two +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >two</a + ></p + ></div + ><h1 + >Three +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >three</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Bugs.html.ref b/html-test/tests/mini_Bugs.html.ref new file mode 100644 index 00000000..3c758375 --- /dev/null +++ b/html-test/tests/mini_Bugs.html.ref @@ -0,0 +1,33 @@ +<!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 + >Bugs</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Bugs</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >A</a + > a</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_CrossPackageDocs.html.ref b/html-test/tests/mini_CrossPackageDocs.html.ref new file mode 100644 index 00000000..4c0588ba --- /dev/null +++ b/html-test/tests/mini_CrossPackageDocs.html.ref @@ -0,0 +1,45 @@ +<!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 + >CrossPackageDocs</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >CrossPackageDocs</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >map</a + ></p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >IsString</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >runInteractiveProcess</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedClass.html.ref b/html-test/tests/mini_DeprecatedClass.html.ref new file mode 100644 index 00000000..3923c1ff --- /dev/null +++ b/html-test/tests/mini_DeprecatedClass.html.ref @@ -0,0 +1,41 @@ +<!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 + >DeprecatedClass</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedClass</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >SomeClass</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >SomeOtherClass</a + > a</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedData.html.ref b/html-test/tests/mini_DeprecatedData.html.ref new file mode 100644 index 00000000..8ef20113 --- /dev/null +++ b/html-test/tests/mini_DeprecatedData.html.ref @@ -0,0 +1,41 @@ +<!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 + >DeprecatedData</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedData</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Foo</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >One</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedFunction.html.ref b/html-test/tests/mini_DeprecatedFunction.html.ref new file mode 100644 index 00000000..9bb90dac --- /dev/null +++ b/html-test/tests/mini_DeprecatedFunction.html.ref @@ -0,0 +1,37 @@ +<!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 + >DeprecatedFunction</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedFunction</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >bar</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedFunction2.html.ref b/html-test/tests/mini_DeprecatedFunction2.html.ref new file mode 100644 index 00000000..a03991a9 --- /dev/null +++ b/html-test/tests/mini_DeprecatedFunction2.html.ref @@ -0,0 +1,31 @@ +<!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 + >DeprecatedFunction2</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedFunction2</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedFunction3.html.ref b/html-test/tests/mini_DeprecatedFunction3.html.ref new file mode 100644 index 00000000..4ea60339 --- /dev/null +++ b/html-test/tests/mini_DeprecatedFunction3.html.ref @@ -0,0 +1,31 @@ +<!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 + >DeprecatedFunction3</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedFunction3</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedModule.html.ref b/html-test/tests/mini_DeprecatedModule.html.ref new file mode 100644 index 00000000..bfdef611 --- /dev/null +++ b/html-test/tests/mini_DeprecatedModule.html.ref @@ -0,0 +1,31 @@ +<!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 + >DeprecatedModule</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedModule</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedModule2.html.ref b/html-test/tests/mini_DeprecatedModule2.html.ref new file mode 100644 index 00000000..dbcc43b9 --- /dev/null +++ b/html-test/tests/mini_DeprecatedModule2.html.ref @@ -0,0 +1,31 @@ +<!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 + >DeprecatedModule2</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedModule2</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedNewtype.html.ref b/html-test/tests/mini_DeprecatedNewtype.html.ref new file mode 100644 index 00000000..a913525f --- /dev/null +++ b/html-test/tests/mini_DeprecatedNewtype.html.ref @@ -0,0 +1,41 @@ +<!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 + >DeprecatedNewtype</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedNewtype</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >SomeNewType</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >SomeOtherNewType</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedReExport.html.ref b/html-test/tests/mini_DeprecatedReExport.html.ref new file mode 100644 index 00000000..8316dda5 --- /dev/null +++ b/html-test/tests/mini_DeprecatedReExport.html.ref @@ -0,0 +1,37 @@ +<!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 + >DeprecatedReExport</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedReExport</p + ></div + ><div id="interface" + ><h1 + >Re-exported from an other module +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ><h1 + >Re-exported from an other package +</h1 + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedRecord.html.ref b/html-test/tests/mini_DeprecatedRecord.html.ref new file mode 100644 index 00000000..3d949d2d --- /dev/null +++ b/html-test/tests/mini_DeprecatedRecord.html.ref @@ -0,0 +1,33 @@ +<!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 + >DeprecatedRecord</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedRecord</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Foo</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedTypeFamily.html.ref b/html-test/tests/mini_DeprecatedTypeFamily.html.ref new file mode 100644 index 00000000..c87d9637 --- /dev/null +++ b/html-test/tests/mini_DeprecatedTypeFamily.html.ref @@ -0,0 +1,41 @@ +<!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 + >DeprecatedTypeFamily</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedTypeFamily</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data family</span + > <a href="" + >SomeTypeFamily</a + > k :: * -> *</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data family</span + > <a href="" + >SomeOtherTypeFamily</a + > k :: * -> *</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecatedTypeSynonym.html.ref b/html-test/tests/mini_DeprecatedTypeSynonym.html.ref new file mode 100644 index 00000000..5ade100d --- /dev/null +++ b/html-test/tests/mini_DeprecatedTypeSynonym.html.ref @@ -0,0 +1,41 @@ +<!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 + >DeprecatedTypeSynonym</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecatedTypeSynonym</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >type</span + > <a href="" target="main" + >TypeSyn</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >type</span + > <a href="" target="main" + >OtherTypeSyn</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_DeprecationMessageParseError.html.ref b/html-test/tests/mini_DeprecationMessageParseError.html.ref new file mode 100644 index 00000000..e52f487f --- /dev/null +++ b/html-test/tests/mini_DeprecationMessageParseError.html.ref @@ -0,0 +1,31 @@ +<!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 + >DeprecationMessageParseError</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >DeprecationMessageParseError</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Examples.html.ref b/html-test/tests/mini_Examples.html.ref new file mode 100644 index 00000000..c99c2c48 --- /dev/null +++ b/html-test/tests/mini_Examples.html.ref @@ -0,0 +1,31 @@ +<!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 + >Examples</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Examples</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >fib</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_FunArgs.html.ref b/html-test/tests/mini_FunArgs.html.ref new file mode 100644 index 00000000..89729720 --- /dev/null +++ b/html-test/tests/mini_FunArgs.html.ref @@ -0,0 +1,37 @@ +<!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 + >FunArgs</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >FunArgs</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >g</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_GADTRecords.html.ref b/html-test/tests/mini_GADTRecords.html.ref new file mode 100644 index 00000000..a8b838f0 --- /dev/null +++ b/html-test/tests/mini_GADTRecords.html.ref @@ -0,0 +1,33 @@ +<!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 + >GADTRecords</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >GADTRecords</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >H1</a + > a b</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Hash.html.ref b/html-test/tests/mini_Hash.html.ref new file mode 100644 index 00000000..1e6ad1a9 --- /dev/null +++ b/html-test/tests/mini_Hash.html.ref @@ -0,0 +1,74 @@ +<!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 + >Hash</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Hash</p + ></div + ><div id="interface" + ><h1 + >The <code + >HashTable</code + > type +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >HashTable</a + > key val</p + ></div + ><h2 + >Operations on <code + >HashTable</code + >s +</h2 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >new</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >insert</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >lookup</a + ></p + ></div + ><h1 + >The <code + >Hash</code + > class +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >Hash</a + > a</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_HiddenInstances.html.ref b/html-test/tests/mini_HiddenInstances.html.ref new file mode 100644 index 00000000..0f1a2e04 --- /dev/null +++ b/html-test/tests/mini_HiddenInstances.html.ref @@ -0,0 +1,41 @@ +<!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 + >HiddenInstances</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >HiddenInstances</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >VisibleClass</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >VisibleData</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_HiddenInstancesB.html.ref b/html-test/tests/mini_HiddenInstancesB.html.ref new file mode 100644 index 00000000..3ce4f6a9 --- /dev/null +++ b/html-test/tests/mini_HiddenInstancesB.html.ref @@ -0,0 +1,41 @@ +<!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 + >HiddenInstancesB</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >HiddenInstancesB</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >Foo</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Bar</a + > </p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Hyperlinks.html.ref b/html-test/tests/mini_Hyperlinks.html.ref new file mode 100644 index 00000000..f0c7d65a --- /dev/null +++ b/html-test/tests/mini_Hyperlinks.html.ref @@ -0,0 +1,31 @@ +<!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 + >Hyperlinks</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Hyperlinks</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_IgnoreExports.html.ref b/html-test/tests/mini_IgnoreExports.html.ref new file mode 100644 index 00000000..a420e65a --- /dev/null +++ b/html-test/tests/mini_IgnoreExports.html.ref @@ -0,0 +1,37 @@ +<!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 + >IgnoreExports</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >IgnoreExports</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >bar</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_ModuleWithWarning.html.ref b/html-test/tests/mini_ModuleWithWarning.html.ref new file mode 100644 index 00000000..19315a14 --- /dev/null +++ b/html-test/tests/mini_ModuleWithWarning.html.ref @@ -0,0 +1,31 @@ +<!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 + >ModuleWithWarning</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >ModuleWithWarning</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >foo</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_NamedDoc.html.ref b/html-test/tests/mini_NamedDoc.html.ref new file mode 100644 index 00000000..066bbc61 --- /dev/null +++ b/html-test/tests/mini_NamedDoc.html.ref @@ -0,0 +1,25 @@ +<!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 + >NamedDoc</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >NamedDoc</p + ></div + ><div id="interface" + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_NoLayout.html.ref b/html-test/tests/mini_NoLayout.html.ref new file mode 100644 index 00000000..19562d70 --- /dev/null +++ b/html-test/tests/mini_NoLayout.html.ref @@ -0,0 +1,31 @@ +<!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 + >NoLayout</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >NoLayout</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >g</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_NonGreedy.html.ref b/html-test/tests/mini_NonGreedy.html.ref new file mode 100644 index 00000000..698c368e --- /dev/null +++ b/html-test/tests/mini_NonGreedy.html.ref @@ -0,0 +1,31 @@ +<!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 + >NonGreedy</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >NonGreedy</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Properties.html.ref b/html-test/tests/mini_Properties.html.ref new file mode 100644 index 00000000..5f538dfd --- /dev/null +++ b/html-test/tests/mini_Properties.html.ref @@ -0,0 +1,31 @@ +<!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 + >Properties</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Properties</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >fib</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_PruneWithWarning.html.ref b/html-test/tests/mini_PruneWithWarning.html.ref new file mode 100644 index 00000000..9eb3aa00 --- /dev/null +++ b/html-test/tests/mini_PruneWithWarning.html.ref @@ -0,0 +1,25 @@ +<!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 + >PruneWithWarning</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >PruneWithWarning</p + ></div + ><div id="interface" + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_QuasiExpr.html.ref b/html-test/tests/mini_QuasiExpr.html.ref new file mode 100644 index 00000000..7dd9b829 --- /dev/null +++ b/html-test/tests/mini_QuasiExpr.html.ref @@ -0,0 +1,59 @@ +<!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 + >QuasiExpr</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >QuasiExpr</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Expr</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >BinOp</a + > </p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >eval</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >expr</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >parseExprExp</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_QuasiQuote.html.ref b/html-test/tests/mini_QuasiQuote.html.ref new file mode 100644 index 00000000..5dac6acc --- /dev/null +++ b/html-test/tests/mini_QuasiQuote.html.ref @@ -0,0 +1,31 @@ +<!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 + >QuasiQuote</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >QuasiQuote</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >val</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_TH.html.ref b/html-test/tests/mini_TH.html.ref new file mode 100644 index 00000000..d2ddbabc --- /dev/null +++ b/html-test/tests/mini_TH.html.ref @@ -0,0 +1,31 @@ +<!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 + >TH</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >TH</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >decl</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_TH2.html.ref b/html-test/tests/mini_TH2.html.ref new file mode 100644 index 00000000..2c9f1340 --- /dev/null +++ b/html-test/tests/mini_TH2.html.ref @@ -0,0 +1,31 @@ +<!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 + >TH2</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >TH2</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Test.html.ref b/html-test/tests/mini_Test.html.ref new file mode 100644 index 00000000..26db2c0f --- /dev/null +++ b/html-test/tests/mini_Test.html.ref @@ -0,0 +1,269 @@ +<!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 + >Test</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Test</p + ></div + ><div id="interface" + ><h1 + >Type declarations +</h1 + ><h2 + >Data types +</h2 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T2</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T3</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T4</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T5</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >T6</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N1</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N2</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N3</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N4</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N5</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N6</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >N7</a + > a b</p + ></div + ><h2 + >Records +</h2 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >R</a + > </p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >R1</a + > </p + ></div + ><h1 + >Class declarations +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >C</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >D</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >E</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >F</a + > a</p + ></div + ><h1 + >Function types +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f</a + ></p + ></div + ><h1 + >Auxiliary stuff +</h1 + ><h1 + >A hidden module +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >hidden</a + ></p + ></div + ><h1 + >A visible module +</h1 + ><h1 + >Existential / Universal types +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Ex</a + > a</p + ></div + ><h1 + >Type signatures with argument docs +</h1 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >k</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >l</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >m</a + ></p + ></div + ><h1 + >A section +</h1 + ><h2 + >A subsection +</h2 + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f'</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >withType</a + ></p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >withoutType</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Ticket112.html.ref b/html-test/tests/mini_Ticket112.html.ref new file mode 100644 index 00000000..68a0a5e5 --- /dev/null +++ b/html-test/tests/mini_Ticket112.html.ref @@ -0,0 +1,31 @@ +<!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 + >Ticket112</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Ticket112</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Ticket61.html.ref b/html-test/tests/mini_Ticket61.html.ref new file mode 100644 index 00000000..a73fefca --- /dev/null +++ b/html-test/tests/mini_Ticket61.html.ref @@ -0,0 +1,33 @@ +<!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 + >Ticket61</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Ticket61</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >C</a + > a</p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Ticket75.html.ref b/html-test/tests/mini_Ticket75.html.ref new file mode 100644 index 00000000..75ce882c --- /dev/null +++ b/html-test/tests/mini_Ticket75.html.ref @@ -0,0 +1,39 @@ +<!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 + >Ticket75</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Ticket75</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > a <a href="" target="main" + >:-</a + > b</p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >f</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_TypeFamilies.html.ref b/html-test/tests/mini_TypeFamilies.html.ref new file mode 100644 index 00000000..0cf39c88 --- /dev/null +++ b/html-test/tests/mini_TypeFamilies.html.ref @@ -0,0 +1,55 @@ +<!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 + >TypeFamilies</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >TypeFamilies</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><span class="keyword" + >type family</span + > <a href="" + >G</a + > a :: *</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >class</span + > <a href="" target="main" + >A</a + > a</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >type family</span + > <a href="" + >F</a + > a </p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >g</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_TypeOperators.html.ref b/html-test/tests/mini_TypeOperators.html.ref new file mode 100644 index 00000000..86b6beec --- /dev/null +++ b/html-test/tests/mini_TypeOperators.html.ref @@ -0,0 +1,66 @@ +<!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 + >TypeOperators</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >TypeOperators</p + ></div + ><div id="interface" + ><h1 + >stuff +</h1 + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > a <a href="" target="main" + >:-:</a + > b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > (a <a href="" target="main" + >:+:</a + > b) c</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >Op</a + > a b</p + ></div + ><div class="top" + ><p class="src" + ><span class="keyword" + >data</span + > <a href="" target="main" + >O</a + > g f a</p + ></div + ><div class="top" + ><p class="src" + ><a href="" target="main" + >biO</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Unicode.html.ref b/html-test/tests/mini_Unicode.html.ref new file mode 100644 index 00000000..55336980 --- /dev/null +++ b/html-test/tests/mini_Unicode.html.ref @@ -0,0 +1,31 @@ +<!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 + >Unicode</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Unicode</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >x</a + ></p + ></div + ></div + ></body + ></html +> diff --git a/html-test/tests/mini_Visible.html.ref b/html-test/tests/mini_Visible.html.ref new file mode 100644 index 00000000..976a30c5 --- /dev/null +++ b/html-test/tests/mini_Visible.html.ref @@ -0,0 +1,31 @@ +<!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 + >Visible</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();}; +//]]> +</script + ></head + ><body id="mini" + ><div id="module-header" + ><p class="caption" + >Visible</p + ></div + ><div id="interface" + ><div class="top" + ><p class="src" + ><a href="" target="main" + >visible</a + ></p + ></div + ></div + ></body + ></html +> |