Repository : ssh://darcs.haskell.org//srv/darcs/haddock

On branch  : ghc-7.6

http://hackage.haskell.org/trac/ghc/changeset/8fe6416bcc1078540c21984cee7ef453dd9f1cfb

>---------------------------------------------------------------

commit 8fe6416bcc1078540c21984cee7ef453dd9f1cfb
Author: Simon Hengel <[email protected]>
Date:   Wed Jun 20 15:42:35 2012 +0200

    Add an other test for hiding instances (#37)

>---------------------------------------------------------------

 tests/html-tests/tests/HiddenInstancesA.hs         |   17 +++++
 tests/html-tests/tests/HiddenInstancesB.hs         |    2 +
 .../{Bug7.html.ref => HiddenInstancesB.html.ref}   |   68 ++++++--------------
 3 files changed, 38 insertions(+), 49 deletions(-)

diff --git a/tests/html-tests/tests/HiddenInstancesA.hs 
b/tests/html-tests/tests/HiddenInstancesA.hs
new file mode 100644
index 0000000..f177520
--- /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 0000000..eabf063
--- /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/Bug7.html.ref 
b/tests/html-tests/tests/HiddenInstancesB.html.ref
similarity index 75%
copy from tests/html-tests/tests/Bug7.html.ref
copy to tests/html-tests/tests/HiddenInstancesB.html.ref
index f7ab171..4d037be 100644
--- a/tests/html-tests/tests/Bug7.html.ref
+++ b/tests/html-tests/tests/HiddenInstancesB.html.ref
@@ -3,13 +3,13 @@
 ><head
   ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
      /><title
-    >Bug7</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_Bug7.html");};
+window.onload = function () 
{pageLoad();setSynopsis("mini_HiddenInstancesB.html");};
 //]]>
 </script
     ></head
@@ -25,7 +25,7 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
          >Index</a
          ></li
        ></ul
-      ><p class="caption" class="empty"
+      ><p class="caption empty"
       >&nbsp;</p
       ></div
     ><div id="content"
@@ -39,17 +39,7 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
            ></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
+       >HiddenInstancesB</p
        ></div
       ><div id="synopsis"
       ><p id="control.syn" class="caption expander" 
onclick="toggleSection('syn')"
@@ -57,18 +47,16 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
        ><ul id="section.syn" class="hide" onclick="toggleSection('syn')"
        ><li class="src short"
          ><span class="keyword"
-           >data</span
+           >class</span
            >  <a href=""
            >Foo</a
-           >  = <a href=""
-           >Foo</a
-           ></li
+           > a </li
          ><li class="src short"
          ><span class="keyword"
-           >class</span
+           >data</span
            >  <a href=""
            >Bar</a
-           > x y </li
+           > </li
          ></ul
        ></div
       ><div id="interface"
@@ -77,29 +65,15 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
        ><div class="top"
        ><p class="src"
          ><span class="keyword"
-           >data</span
+           >class</span
            >  <a name="t:Foo" class="def"
            >Foo</a
-           >  </p
+           > a </p
          ><div class="doc"
          ><p
-           >The Foo datatype
+           >Should be visible
 </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"
-               >&nbsp;</td
-               ></tr
-             ></table
-           ></div
          ><div class="subs instances"
          ><p id="control.i:Foo" class="caption collapser" 
onclick="toggleSection('i:Foo')"
            >Instances</p
@@ -108,15 +82,13 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
              ><tr
                ><td class="src"
                  ><a href=""
-                   >Bar</a
-                   > <a href=""
                    >Foo</a
                    > <a href=""
-                   >Foo</a
+                   >Bar</a
                    ></td
                  ><td class="doc"
                  ><p
-                   >Just one instance
+                   >Should be visible
 </p
                    ></td
                  ></tr
@@ -127,13 +99,13 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
        ><div class="top"
        ><p class="src"
          ><span class="keyword"
-           >class</span
+           >data</span
            >  <a name="t:Bar" class="def"
            >Bar</a
-           > x y </p
+           >  </p
          ><div class="doc"
          ><p
-           >The Bar class
+           >Should be visible
 </p
            ></div
          ><div class="subs instances"
@@ -144,15 +116,13 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
              ><tr
                ><td class="src"
                  ><a href=""
-                   >Bar</a
-                   > <a href=""
                    >Foo</a
                    > <a href=""
-                   >Foo</a
+                   >Bar</a
                    ></td
                  ><td class="doc"
                  ><p
-                   >Just one instance
+                   >Should be visible
 </p
                    ></td
                  ></tr
@@ -166,7 +136,7 @@ window.onload = function () 
{pageLoad();setSynopsis("mini_Bug7.html");};
     ><p
       >Produced by <a href=""
        >Haddock</a
-       > version 2.10.0</p
+       > version 2.11.0</p
       ></div
     ></body
   ></html



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to