[commit: haddock] ghc-head, ghc-head1, master, wip/T14529, wip/revert-ttg-2017-11-20, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13, wip/ttg6-unrevert-2017-11-22: Inhibit output of coverage information for hidden modules. (#687) (406030f)

git at git.haskell.org git at git.haskell.org
Tue Nov 28 11:55:05 UTC 2017


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

On branches: ghc-head,ghc-head1,master,wip/T14529,wip/revert-ttg-2017-11-20,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13,wip/ttg6-unrevert-2017-11-22
Link       : http://git.haskell.org/haddock.git/commitdiff/406030f2782590799e44470da7ca80e85f3cf026

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

commit 406030f2782590799e44470da7ca80e85f3cf026
Author: Merijn Verstraaten <merijn at inconsistent.nl>
Date:   Wed Oct 4 16:03:13 2017 +0200

    Inhibit output of coverage information for hidden modules. (#687)
    
    * Inhibit output of coverage information for hidden modules.
    
    * Add changelog entry.


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

406030f2782590799e44470da7ca80e85f3cf026
 CHANGES.md                           |  3 +++
 haddock-api/src/Haddock/Interface.hs | 13 +++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 3e3498c..0b4ca29 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,9 @@
 
  * to be released
 
+ * Haddock no longer reports coverage statistics for hidden modules. By default
+   cabal-install marks all package internal modules as hidden.
+
  * Haddock now writes additional information about the documentation to `meta.json`
 
  * Fix renaming of type variables after specializing instance method signatures (#613)
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs
index f2d099b..25755cf 100644
--- a/haddock-api/src/Haddock/Interface.hs
+++ b/haddock-api/src/Haddock/Interface.hs
@@ -206,12 +206,13 @@ processModule verbosity modsum flags modMap instIfaceMap = do
                          then drop (length ms) n
                          else n
 
-    out verbosity normal coverageMsg
-    when (Flag_NoPrintMissingDocs `notElem` flags
-          && not (null undocumentedExports && header)) $ do
-      out verbosity normal "  Missing documentation for:"
-      unless header $ out verbosity normal "    Module header"
-      mapM_ (out verbosity normal . ("    " ++)) undocumentedExports
+    when (OptHide `notElem` ifaceOptions interface) $ do
+      out verbosity normal coverageMsg
+      when (Flag_NoPrintMissingDocs `notElem` flags
+            && not (null undocumentedExports && header)) $ do
+        out verbosity normal "  Missing documentation for:"
+        unless header $ out verbosity normal "    Module header"
+        mapM_ (out verbosity normal . ("    " ++)) undocumentedExports
     interface' <- liftIO $ evaluate interface
     return (Just interface')
   else



More information about the ghc-commits mailing list