aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. ERDI Gergo <gergo@erdi.hu>2014-11-29 15:39:09 +0800
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-12-12 07:36:18 +0000
commit3fd4c8c0b1be302d209e580d7190aef7c923a2ee (patch)
tree414a4e5fdf0dcaf1eb9642931687572e3e17fa70
parent0573481fd4ed19ce72e23d631a7e8e3d0e4cb288 (diff)
For pattern synonyms, render "pattern" as a keyword
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs2
-rw-r--r--html-test/ref/Operators.html8
-rw-r--r--html-test/ref/PatternSyns.html32
3 files changed, 31 insertions, 11 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index 25a080d5..a75553b8 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/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
diff --git a/html-test/ref/Operators.html b/html-test/ref/Operators.html
index 516fe602..e9be655f 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