[commit: haddock] ghc-7.6: Handle HsExplicitListTy in renameer (fixes #213) (2107860)

Simon Hengel <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/haddock

On branch  : ghc-7.6

http://hackage.haskell.org/trac/ghc/changeset/2107860036788651c8286f9e1435472b3e799736

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

commit 2107860036788651c8286f9e1435472b3e799736
Author: Simon Hengel <[email protected]>
Date:   Sat Oct 13 19:02:16 2012 +0200

    Handle HsExplicitListTy in renameer (fixes #213)

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

 src/Haddock/Interface/Rename.hs                    |    2 +
 tests/html-tests/tests/AdvanceTypes.hs             |    9 +++++
 .../tests/{Bugs.html.ref => AdvanceTypes.html.ref} |   38 ++++++++++++++------
 ...ni_Bug1.html.ref => mini_AdvanceTypes.html.ref} |    6 ++--
 4 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 55c9a5d..4bdbcb7 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -271,6 +271,8 @@ renameType t = case t of
 
   HsTyLit x -> return (HsTyLit x)
 
+  HsExplicitListTy a b    -> HsExplicitListTy a <$> mapM renameLType b
+
   _ -> error "renameType"
 
 
diff --git a/tests/html-tests/tests/AdvanceTypes.hs b/tests/html-tests/tests/AdvanceTypes.hs
new file mode 100644
index 0000000..939fdf0
--- /dev/null
+++ b/tests/html-tests/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/tests/html-tests/tests/Bugs.html.ref b/tests/html-tests/tests/AdvanceTypes.html.ref
similarity index 70%
copy from tests/html-tests/tests/Bugs.html.ref
copy to tests/html-tests/tests/AdvanceTypes.html.ref
index c5a4ca9..bac545b 100644
--- a/tests/html-tests/tests/Bugs.html.ref
+++ b/tests/html-tests/tests/AdvanceTypes.html.ref
@@ -3,13 +3,13 @@
 ><head
   ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
      /><title
-    >Bugs</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_Bugs.html");};
+window.onload = function () {pageLoad();setSynopsis("mini_AdvanceTypes.html");};
 //]]>
 </script
     ></head
@@ -39,7 +39,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bugs.html");};
 	    ></tr
 	  ></table
 	><p class="caption"
-	>Bugs</p
+	>AdvanceTypes</p
 	></div
       ><div id="interface"
       ><h1
@@ -48,20 +48,36 @@ window.onload = function () {pageLoad();setSynopsis("mini_Bugs.html");};
 	><p class="src"
 	  ><span class="keyword"
 	    >data</span
-	    >  <a name="t:A" class="def"
-	    >A</a
-	    > a </p
+	    >  <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:A" class="def"
-		  >A</a
-		  > a (a -&gt; <a href=""
-		  >Int</a
-		  >)</td
+		><a name="v:Nil" class="def"
+		  >Nil</a
+		  > ::  <a href=""
+		  >Pattern</a
+		  > `[]`</td
+		><td class="doc empty"
+		>&nbsp;</td
+		></tr
+	      ><tr
+	      ><td class="src"
+		><a name="v:Cons" class="def"
+		  >Cons</a
+		  > ::  <a href=""
+		  >Maybe</a
+		  > h -&gt; <a href=""
+		  >Pattern</a
+		  > t -&gt; <a href=""
+		  >Pattern</a
+		  > (h : t)</td
 		><td class="doc empty"
 		>&nbsp;</td
 		></tr
diff --git a/tests/html-tests/tests/mini_Bug1.html.ref b/tests/html-tests/tests/mini_AdvanceTypes.html.ref
similarity index 92%
copy from tests/html-tests/tests/mini_Bug1.html.ref
copy to tests/html-tests/tests/mini_AdvanceTypes.html.ref
index adf81c7..59d8dcb 100644
--- a/tests/html-tests/tests/mini_Bug1.html.ref
+++ b/tests/html-tests/tests/mini_AdvanceTypes.html.ref
@@ -3,7 +3,7 @@
 ><head
   ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
      /><title
-    >Bug1</title
+    >AdvanceTypes</title
     ><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean"
      /><script src="haddock-util.js" type="text/javascript"
     ></script
@@ -16,7 +16,7 @@ window.onload = function () {pageLoad();};
   ><body id="mini"
   ><div id="module-header"
     ><p class="caption"
-      >Bug1</p
+      >AdvanceTypes</p
       ></div
     ><div id="interface"
     ><div class="top"
@@ -24,7 +24,7 @@ window.onload = function () {pageLoad();};
 	><span class="keyword"
 	  >data</span
 	  > <a href="" target="main"
-	  >T</a
+	  >Pattern</a
 	  > </p
 	></div
       ></div
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.