[commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, wip/10268, wip/10313, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-ann-hstylit, wip/api-ann-hstylit-1, wip/api-ann-hstylit-2, wip/api-ann-hstylit-3, wip/api-ann-hstylit-4, wip/api-ann-hstylit-5, wip/orf-reboot, wip/trac-9744: For pattern synonyms, render "pattern" as a keyword (b94ab90)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:33:52 UTC 2015


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

On branches: T6018-injective-type-families,adamse-D1033,ghc-head,wip/10268,wip/10313,wip/D548-master,wip/D548-master-2,wip/T10483,wip/T9840,wip/api-ann-hstylit,wip/api-ann-hstylit-1,wip/api-ann-hstylit-2,wip/api-ann-hstylit-3,wip/api-ann-hstylit-4,wip/api-ann-hstylit-5,wip/orf-reboot,wip/trac-9744
Link       : http://git.haskell.org/haddock.git/commitdiff/b94ab9034367f51b978904d60f2604db10abbd9f

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

commit b94ab9034367f51b978904d60f2604db10abbd9f
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Sat Nov 29 15:39:09 2014 +0800

    For pattern synonyms, render "pattern" as a keyword


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

b94ab9034367f51b978904d60f2604db10abbd9f
 html-test/ref/Operators.html       |  8 ++++++--
 html-test/ref/PatternSyns.html     | 32 ++++++++++++++++++++++++--------
 src/Haddock/Backends/Xhtml/Decl.hs |  2 +-
 3 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/html-test/ref/Operators.html b/html-test/ref/Operators.html
index dc06e3b..b076206 100644
--- a/html-test/ref/Operators.html
+++ b/html-test/ref/Operators.html
@@ -90,7 +90,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
 	      ></ul
 	    ></li
 	  ><li class="src short"
-	  >pattern  <a href=""
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a href=""
 	    >(:+)</a
 	    > ::   t -> t -> [t]</li
 	  ><li class="src short"
@@ -266,7 +268,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_Operators.html");};
 	  ></div
 	><div class="top"
 	><p class="src"
-	  >pattern  <a name="v::-43-" class="def"
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a name="v::-43-" class="def"
 	    >(:+)</a
 	    > ::   t -> t -> [t] <span class="fixity"
 	    >infixr 3</span
diff --git a/html-test/ref/PatternSyns.html b/html-test/ref/PatternSyns.html
index f5842d7..00861b3 100644
--- a/html-test/ref/PatternSyns.html
+++ b/html-test/ref/PatternSyns.html
@@ -62,13 +62,17 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	    >FooCtor</a
 	    > x</li
 	  ><li class="src short"
-	  >pattern <a href=""
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a href=""
 	    >Foo</a
 	    > ::   t -> <a href=""
 	    >FooType</a
 	    > t</li
 	  ><li class="src short"
-	  >pattern <a href=""
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a href=""
 	    >Bar</a
 	    > ::   t -> <a href=""
 	    >FooType</a
@@ -76,7 +80,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	    >FooType</a
 	    > t)</li
 	  ><li class="src short"
-	  >pattern <a href=""
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a href=""
 	    >(:<->)</a
 	    > ::   t -> t -> (<a href=""
 	    >FooType</a
@@ -94,7 +100,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	    >Empty</a
 	    ></li
 	  ><li class="src short"
-	  >pattern <a href=""
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a href=""
 	    >E</a
 	    > ::   <a href=""
 	    >(><)</a
@@ -132,7 +140,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	  ></div
 	><div class="top"
 	><p class="src"
-	  >pattern <a name="v:Foo" class="def"
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a name="v:Foo" class="def"
 	    >Foo</a
 	    > ::   t -> <a href=""
 	    >FooType</a
@@ -148,7 +158,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	  ></div
 	><div class="top"
 	><p class="src"
-	  >pattern <a name="v:Bar" class="def"
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a name="v:Bar" class="def"
 	    >Bar</a
 	    > ::   t -> <a href=""
 	    >FooType</a
@@ -166,7 +178,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	  ></div
 	><div class="top"
 	><p class="src"
-	  >pattern <a name="v::-60--45--62-" class="def"
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a name="v::-60--45--62-" class="def"
 	    >(:<->)</a
 	    > ::   t -> t -> (<a href=""
 	    >FooType</a
@@ -214,7 +228,9 @@ window.onload = function () {pageLoad();setSynopsis("mini_PatternSyns.html");};
 	  ></div
 	><div class="top"
 	><p class="src"
-	  >pattern <a name="v:E" class="def"
+	  ><span class="keyword"
+	    >pattern</span
+	    > <a name="v:E" class="def"
 	    >E</a
 	    > ::   <a href=""
 	    >(><)</a
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index 2c0a124..85e00e9 100644
--- a/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/src/Haddock/Backends/Xhtml/Decl.hs
@@ -83,7 +83,7 @@ ppLPatSig summary links loc (doc, _argDocs) (L _ name) (expl, qtvs) lprov lreq t
   | otherwise = topDeclElem links loc splice [name] (pref1 <+> ppFixities fixities qual)
                 +++ docSection Nothing qual doc
   where
-    pref1 = hsep [ toHtml "pattern"
+    pref1 = hsep [ keyword "pattern"
                  , ppBinder summary occname
                  , dcolon unicode
                  , ppLTyVarBndrs expl qtvs unicode qual



More information about the ghc-commits mailing list