[commit: haddock] master: Add test case for inter-module type/data family instances (6b35adf)

git at git.haskell.org git at git.haskell.org
Sat Feb 15 21:57:11 UTC 2014


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/6b35adfb811d9e41e5bfa1c11963e441740c2836

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

commit 6b35adfb811d9e41e5bfa1c11963e441740c2836
Author: Niklas Haas <git at nand.wakku.to>
Date:   Sat Feb 15 08:41:40 2014 +0100

    Add test case for inter-module type/data family instances
    
    These should show up in every place where the class is visible, and
    indeed they do right now.
    
    Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk>


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

6b35adfb811d9e41e5bfa1c11963e441740c2836
 html-test/ref/TypeFamilies.html  |   28 +++++++++++++++
 html-test/ref/TypeFamilies2.html |   72 ++++++++++++++++++++++++++++++++++++++
 html-test/src/TypeFamilies.hs    |    8 +++++
 html-test/src/TypeFamilies2.hs   |    5 ++-
 4 files changed, 112 insertions(+), 1 deletion(-)

diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html
index 6584510..53a8b9d 100644
--- a/html-test/ref/TypeFamilies.html
+++ b/html-test/ref/TypeFamilies.html
@@ -235,6 +235,22 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
 		><tr
 		><td class="src"
 		  ><span class="keyword"
+		    >type</span
+		    > <a href="TypeFamilies2.html#t:Foo"
+		    >Foo</a
+		    > <a href="TypeFamilies.html#t:X"
+		    >X</a
+		    > = <a href="TypeFamilies.html#t:Y"
+		    >Y</a
+		    ></td
+		  ><td class="doc"
+		  ><p
+		    >External instance</p
+		    ></td
+		  ></tr
+		><tr
+		><td class="src"
+		  ><span class="keyword"
 		    >data</span
 		    > <a href="TypeFamilies.html#t:Bat"
 		    >Bat</a
@@ -398,6 +414,18 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");};
 		><td class="src"
 		  ><span class="keyword"
 		    >data</span
+		    > <a href="TypeFamilies2.html#t:Bar"
+		    >Bar</a
+		    > <a href="TypeFamilies.html#t:Y"
+		    >Y</a
+		    ></td
+		  ><td class="doc empty"
+		  > </td
+		  ></tr
+		><tr
+		><td class="src"
+		  ><span class="keyword"
+		    >data</span
 		    > <a href="TypeFamilies.html#t:Bat"
 		    >Bat</a
 		    > <a href="TypeFamilies.html#t:Y"
diff --git a/html-test/ref/TypeFamilies2.html b/html-test/ref/TypeFamilies2.html
index eaa0772..d822e19 100644
--- a/html-test/ref/TypeFamilies2.html
+++ b/html-test/ref/TypeFamilies2.html
@@ -59,6 +59,20 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
 	      ><tr
 		><td class="src"
 		  ><span class="keyword"
+		    >data</span
+		    > <a href="TypeFamilies2.html#t:Bar"
+		    >Bar</a
+		    > <a href="TypeFamilies2.html#t:X"
+		    >X</a
+		    > = <a name="v:BarX" class="def"
+		    >BarX</a
+		    > Y</td
+		  ><td class="doc empty"
+		  > </td
+		  ></tr
+		><tr
+		><td class="src"
+		  ><span class="keyword"
 		    >type</span
 		    > <a href="TypeFamilies2.html#t:Foo"
 		    >Foo</a
@@ -96,6 +110,64 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies2.html");}
 		  ><td class="doc empty"
 		  > </td
 		  ></tr
+		><tr
+		><td class="src"
+		  ><span class="keyword"
+		    >type</span
+		    > <a href="TypeFamilies2.html#t:Foo"
+		    >Foo</a
+		    > <a href="TypeFamilies.html#t:X"
+		    >X</a
+		    > = <a href="TypeFamilies.html#t:Y"
+		    >Y</a
+		    ></td
+		  ><td class="doc"
+		  ><p
+		    >External instance</p
+		    ></td
+		  ></tr
+		></table
+	      ></div
+	    ></div
+	  ></div
+	><div class="top"
+	><p class="src"
+	  ><span class="keyword"
+	    >data family</span
+	    > <a name="t:Bar" class="def"
+	    >Bar</a
+	    > a</p
+	  ><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"
+		  ><span class="keyword"
+		    >data</span
+		    > <a href="TypeFamilies2.html#t:Bar"
+		    >Bar</a
+		    > <a href="TypeFamilies2.html#t:X"
+		    >X</a
+		    > = <a name="v:BarX" class="def"
+		    >BarX</a
+		    > Y</td
+		  ><td class="doc empty"
+		  > </td
+		  ></tr
+		><tr
+		><td class="src"
+		  ><span class="keyword"
+		    >data</span
+		    > <a href="TypeFamilies2.html#t:Bar"
+		    >Bar</a
+		    > <a href="TypeFamilies.html#t:Y"
+		    >Y</a
+		    ></td
+		  ><td class="doc empty"
+		  > </td
+		  ></tr
 		></table
 	      ></div
 	    ></div
diff --git a/html-test/src/TypeFamilies.hs b/html-test/src/TypeFamilies.hs
index e7cc045..5cd4480 100644
--- a/html-test/src/TypeFamilies.hs
+++ b/html-test/src/TypeFamilies.hs
@@ -3,6 +3,8 @@
 -- | Doc for: module TypeFamilies
 module TypeFamilies where
 
+import qualified TypeFamilies2 as TF
+
 -- | Doc for: data X
 data X
   = X   -- ^ Doc for: X
@@ -76,3 +78,9 @@ type instance XXX <> XX = 'X
 
 class (><) (a :: k) (b :: k)
 instance XX >< XXX
+
+-- | External instance
+
+type instance TF.Foo X = Y
+
+data instance TF.Bar Y
diff --git a/html-test/src/TypeFamilies2.hs b/html-test/src/TypeFamilies2.hs
index 718e11d..093f77c 100644
--- a/html-test/src/TypeFamilies2.hs
+++ b/html-test/src/TypeFamilies2.hs
@@ -3,10 +3,13 @@
 -- in type instances. The expected behaviour is
 -- that we get the instance, Y is not linked and
 -- Haddock shows a linking warning.
-module TypeFamilies2 (X, Foo) where
+module TypeFamilies2 (X, Foo, Bar) where
 
 data X
 data Y
 
 type family Foo a
 type instance Foo X = Y
+
+data family Bar a
+data instance Bar X = BarX Y



More information about the ghc-commits mailing list