[commit: haddock] T6018-injective-type-families, adamse-D1033, ghc-head, master, wip/10268, wip/10313, wip/D538, wip/D538-1, wip/D538-2, wip/D538-3, wip/D538-4, wip/D538-5, wip/D538-6, wip/D548-master, wip/D548-master-2, wip/T10483, wip/T9840, wip/api-annot-tweaks-7.10, wip/api-annots-ghc-7.10-3, wip/orf-reboot: Followup changes to addition of -fwarn-context-quantification (GHC Trac #4426) (0833291)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:34:25 UTC 2015


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

On branches: T6018-injective-type-families,adamse-D1033,ghc-head,master,wip/10268,wip/10313,wip/D538,wip/D538-1,wip/D538-2,wip/D538-3,wip/D538-4,wip/D538-5,wip/D538-6,wip/D548-master,wip/D548-master-2,wip/T10483,wip/T9840,wip/api-annot-tweaks-7.10,wip/api-annots-ghc-7.10-3,wip/orf-reboot
Link       : http://git.haskell.org/haddock.git/commitdiff/08332912f745dbd48c6e5fbf0c35e9828600b4db

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

commit 08332912f745dbd48c6e5fbf0c35e9828600b4db
Author: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Date:   Sun Sep 14 14:08:35 2014 +0200

    Followup changes to addition of -fwarn-context-quantification (GHC Trac #4426)


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

08332912f745dbd48c6e5fbf0c35e9828600b4db
 haddock-api/src/Haddock/Backends/Hoogle.hs     | 1 +
 haddock-api/src/Haddock/Backends/LaTeX.hs      | 5 ++++-
 haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index 3ea73db..c8085fa 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/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/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs
index f540527..e9cc48c 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/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
 
 
@@ -872,7 +875,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/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index 517ad64..893c2a5 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -651,6 +651,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
 
 
@@ -813,7 +814,7 @@ ppForAllCon 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
 
 



More information about the ghc-commits mailing list