aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. ERDI Gergo <gergo@erdi.hu>2014-11-29 15:39:09 +0800
committerDr. ERDI Gergo <gergo@erdi.hu>2014-11-29 15:39:09 +0800
commitb94ab9034367f51b978904d60f2604db10abbd9f (patch)
treef7bebc14edfffd5dd640b065dd64d02443819408
parent1a9dcfef033dd66514015d4a942ba67d21f95482 (diff)
For pattern synonyms, render "pattern" as a keyword
-rw-r--r--html-test/ref/Operators.html8
-rw-r--r--html-test/ref/PatternSyns.html32
-rw-r--r--src/Haddock/Backends/Xhtml/Decl.hs2
3 files changed, 31 insertions, 11 deletions
diff --git a/html-test/ref/Operators.html b/html-test/ref/Operators.html
index dc06e3b5..b076206d 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 -&gt; t -&gt; [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 -&gt; t -&gt; [t] <span class="fixity"
>infixr 3</span
diff --git a/html-test/ref/PatternSyns.html b/html-test/ref/PatternSyns.html
index f5842d79..00861b39 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 -&gt; <a href=""
>FooType</a
> t</li
><li class="src short"
- >pattern <a href=""
+ ><span class="keyword"
+ >pattern</span
+ > <a href=""
>Bar</a
> :: t -&gt; <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=""
>(:&lt;-&gt;)</a
> :: t -&gt; t -&gt; (<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=""
>(&gt;&lt;)</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 -&gt; <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 -&gt; <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"
>(:&lt;-&gt;)</a
> :: t -&gt; t -&gt; (<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=""
>(&gt;&lt;)</a
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index 2c0a124a..85e00e91 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