aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-09-18 15:32:15 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2014-09-18 15:32:15 -0700
commit12dc730e62236e15f1194ddc8260affc24928bd1 (patch)
tree03ca78f51dbac9f6c5c95cb2b93e1ed74c0169a6 /src/Haddock
parentdb14fd8ab4fab43694139bc203808b814eafb2dc (diff)
Revert "Revert "Followup changes to addition of -fwarn-context-quantification""
This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now.
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Backends/Hoogle.hs1
-rw-r--r--src/Haddock/Backends/LaTeX.hs5
-rw-r--r--src/Haddock/Backends/Xhtml/Decl.hs3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs
index 13145298..4535ce5c 100644
--- a/src/Haddock/Backends/Hoogle.hs
+++ b/src/Haddock/Backends/Hoogle.hs
@@ -134,6 +134,7 @@ ppSig dflags (TypeSig names sig)
prettyNames = intercalate ", " $ map (out dflags) names
typ = case unL sig of
HsForAllTy Explicit a b c -> HsForAllTy Implicit a b c
+ HsForAllTy Qualified a b c -> HsForAllTy Implicit a b c
x -> x
ppSig _ _ = []
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs
index eca22077..014f3350 100644
--- a/src/Haddock/Backends/LaTeX.hs
+++ b/src/Haddock/Backends/LaTeX.hs
@@ -402,6 +402,8 @@ ppTypeOrFunSig _ _ typ (doc, argDocs) (pref1, pref2, sep0)
ppLContextNoArrow lctxt unicode) <+> nl $$
do_largs n (darrow unicode) ltype
+ do_args n leader (HsForAllTy Qualified a lctxt ltype)
+ = do_args n leader (HsForAllTy Implicit a lctxt ltype)
do_args n leader (HsForAllTy Implicit _ lctxt ltype)
| not (null (unLoc lctxt))
= decltt leader <-> decltt (ppLContextNoArrow lctxt unicode) <+> nl $$
@@ -621,6 +623,7 @@ ppConstrHdr forall tvs ctxt unicode
where
ppForall = case forall of
Explicit -> forallSymbol unicode <+> hsep (map ppName tvs) <+> text ". "
+ Qualified -> empty
Implicit -> empty
@@ -871,7 +874,7 @@ ppForAll expl tvs cxt unicode
| otherwise = ppLContext cxt unicode
where
show_forall = not (null (hsQTvBndrs tvs)) && is_explicit
- is_explicit = case expl of {Explicit -> True; Implicit -> False}
+ is_explicit = case expl of {Explicit -> True; Implicit -> False; Qualified -> False}
forall_part = hsep (forallSymbol unicode : ppTyVars tvs) <> dot
diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs
index 0429580c..829c6668 100644
--- a/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/src/Haddock/Backends/Xhtml/Decl.hs
@@ -650,6 +650,7 @@ ppConstrHdr forall_ tvs ctxt unicode qual
where
ppForall = case forall_ of
Explicit -> forallSymbol unicode <+> hsep (map (ppName Prefix) tvs) <+> toHtml ". "
+ Qualified -> noHtml
Implicit -> noHtml
@@ -812,7 +813,7 @@ ppForAll expl tvs cxt unicode qual
| otherwise = ppLContext cxt unicode qual
where
show_forall = not (null (hsQTvBndrs tvs)) && is_explicit
- is_explicit = case expl of {Explicit -> True; Implicit -> False}
+ is_explicit = case expl of {Explicit -> True; Implicit -> False; Qualified -> False}
forall_part = hsep (forallSymbol unicode : ppTyVars tvs) +++ dot