diff options
author | David Waern <david.waern@gmail.com> | 2012-09-07 15:22:43 +0200 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2012-09-07 15:22:43 +0200 |
commit | d8b3b28044ea851059286663514198171f211b15 (patch) | |
tree | 23ffe44675ca9ba031415d1f83368e4e302ac1f6 /tests/html-tests | |
parent | 8bfe43db4fbd50510c66fc73546f2087e8acf310 (diff) | |
parent | 42422b76fd65dfd37ada0d4da5a85fdf30bf0fa2 (diff) |
Merge branch 'hidden-instances' into ghc-7.6
Diffstat (limited to 'tests/html-tests')
-rw-r--r-- | tests/html-tests/tests/HiddenInstances.hs | 35 | ||||
-rw-r--r-- | tests/html-tests/tests/HiddenInstances.html.ref | 169 | ||||
-rw-r--r-- | tests/html-tests/tests/HiddenInstancesA.hs | 17 | ||||
-rw-r--r-- | tests/html-tests/tests/HiddenInstancesB.hs | 2 | ||||
-rw-r--r-- | tests/html-tests/tests/HiddenInstancesB.html.ref | 143 |
5 files changed, 366 insertions, 0 deletions
diff --git a/tests/html-tests/tests/HiddenInstances.hs b/tests/html-tests/tests/HiddenInstances.hs new file mode 100644 index 00000000..99a6c2fd --- /dev/null +++ b/tests/html-tests/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/tests/html-tests/tests/HiddenInstances.html.ref b/tests/html-tests/tests/HiddenInstances.html.ref new file mode 100644 index 00000000..c1b75927 --- /dev/null +++ b/tests/html-tests/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" class="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.10.0</p + ></div + ></body + ></html +> diff --git a/tests/html-tests/tests/HiddenInstancesA.hs b/tests/html-tests/tests/HiddenInstancesA.hs new file mode 100644 index 00000000..f1775208 --- /dev/null +++ b/tests/html-tests/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/tests/html-tests/tests/HiddenInstancesB.hs b/tests/html-tests/tests/HiddenInstancesB.hs new file mode 100644 index 00000000..eabf0637 --- /dev/null +++ b/tests/html-tests/tests/HiddenInstancesB.hs @@ -0,0 +1,2 @@ +module HiddenInstancesB (Foo, Bar) where +import HiddenInstancesA diff --git a/tests/html-tests/tests/HiddenInstancesB.html.ref b/tests/html-tests/tests/HiddenInstancesB.html.ref new file mode 100644 index 00000000..4d037bec --- /dev/null +++ b/tests/html-tests/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.11.0</p + ></div + ></body + ></html +> |