aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/html-tests/tests/HiddenInstances.hs35
-rw-r--r--tests/html-tests/tests/HiddenInstances.html.ref169
2 files changed, 204 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"
+ >&nbsp;</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
+>