Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Keep forall on H98 existential data constructors #1003

Merged
merged 1 commit into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion haddock-api/src/Haddock/Backends/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,9 @@ ppSideBySideConstr subdocs unicode leader (L _ con) =
decl = case con of
ConDeclH98{ con_args = det
, con_ex_tvs = tyVars
, con_forall = L _ forall_
, con_mb_cxt = cxt
} -> let context = unLoc (fromMaybe (noLoc []) cxt)
forall_ = False
header_ = ppConstrHdr forall_ tyVars context unicode
in case det of
-- Prefix constructor, e.g. 'Just a'
Expand Down
4 changes: 2 additions & 2 deletions haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,9 @@ ppShortConstrParts summary dataInst con unicode qual
= case con of
ConDeclH98{ con_args = det
, con_ex_tvs = tyVars
, con_forall = L _ forall_
, con_mb_cxt = cxt
} -> let context = unLoc (fromMaybe (noLoc []) cxt)
forall_ = False
header_ = ppConstrHdr forall_ tyVars context unicode qual
in case det of

Expand Down Expand Up @@ -873,9 +873,9 @@ ppSideBySideConstr subdocs fixities unicode pkg qual (L _ con)
decl = case con of
ConDeclH98{ con_args = det
, con_ex_tvs = tyVars
, con_forall = L _ forall_
, con_mb_cxt = cxt
} -> let context = unLoc (fromMaybe (noLoc []) cxt)
forall_ = False
header_ = ppConstrHdr forall_ tyVars context unicode qual
in case det of
-- Prefix constructor, e.g. 'Just a'
Expand Down
8 changes: 6 additions & 2 deletions html-test/ref/PatternSyns.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@
>data</span
> <a href="#"
>BlubType</a
> = <a href="#" title="Text.Show"
> = <span class="keyword"
>forall</span
> x.<a href="#" title="Text.Show"
>Show</a
> x =&gt; <a href="#"
>BlubCtor</a
Expand Down Expand Up @@ -274,7 +276,9 @@
><table
><tr
><td class="src"
><a href="#" title="Text.Show"
><span class="keyword"
>forall</span
> x.<a href="#" title="Text.Show"
>Show</a
> x =&gt; <a id="v:BlubCtor" class="def"
>BlubCtor</a
Expand Down
24 changes: 18 additions & 6 deletions html-test/ref/Test.html
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,23 @@
>Ex</a
> a<ul class="subs"
><li
>= <a href="#" title="Test"
>= <span class="keyword"
>forall</span
> b.<a href="#" title="Test"
>C</a
> b =&gt; <a href="#"
>Ex1</a
> b</li
><li
>| <a href="#"
>| <span class="keyword"
>forall</span
> b. <a href="#"
>Ex2</a
> b</li
><li
>| <a href="#" title="Test"
>| <span class="keyword"
>forall</span
> b.<a href="#" title="Test"
>C</a
> a =&gt; <a href="#"
>Ex3</a
Expand Down Expand Up @@ -2069,7 +2075,9 @@
><table
><tr
><td class="src"
><a href="#" title="Test"
><span class="keyword"
>forall</span
> b.<a href="#" title="Test"
>C</a
> b =&gt; <a id="v:Ex1" class="def"
>Ex1</a
Expand All @@ -2079,15 +2087,19 @@
></tr
><tr
><td class="src"
><a id="v:Ex2" class="def"
><span class="keyword"
>forall</span
> b. <a id="v:Ex2" class="def"
>Ex2</a
> b</td
><td class="doc empty"
></td
></tr
><tr
><td class="src"
><a href="#" title="Test"
><span class="keyword"
>forall</span
> b.<a href="#" title="Test"
>C</a
> a =&gt; <a id="v:Ex3" class="def"
>Ex3</a
Expand Down