From d5090d5e9921a61d0a15a95b088210d51f825033 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Thu, 18 Dec 2014 07:14:23 +0000 Subject: Print missing docs by default Adds --no-print-missing-docs --- CHANGES | 2 ++ haddock-api/src/Haddock/Interface.hs | 2 +- haddock-api/src/Haddock/Options.hs | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 2dd563dd..ef0b1be9 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,8 @@ Changes in version 2.16.0 * Fix parsing of infix identifiers such as ``elem``. + * Print missing docs by default and add --no-print-missing-docs + Changes in version 2.15.0 * Always read in prologue files as UTF8 (#286 and Cabal #1721) diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index 60a20fe5..1bb04ed3 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -195,7 +195,7 @@ processModule verbosity modsum flags modMap instIfaceMap = do else n out verbosity normal coverageMsg - when (Flag_PrintMissingDocs `elem` flags + when (Flag_NoPrintMissingDocs `notElem` flags && not (null undocumentedExports && header)) $ do out verbosity normal " Missing documentation for:" unless header $ out verbosity normal " Module header" diff --git a/haddock-api/src/Haddock/Options.hs b/haddock-api/src/Haddock/Options.hs index b166de46..3fa6397f 100644 --- a/haddock-api/src/Haddock/Options.hs +++ b/haddock-api/src/Haddock/Options.hs @@ -82,7 +82,7 @@ data Flag | Flag_NoTmpCompDir | Flag_Qualification String | Flag_PrettyHtml - | Flag_PrintMissingDocs + | Flag_NoPrintMissingDocs deriving (Eq) @@ -170,8 +170,8 @@ options backwardsCompat = "do not re-direct compilation output to a temporary directory", Option [] ["pretty-html"] (NoArg Flag_PrettyHtml) "generate html with newlines and indenting (for use with --html)", - Option [] ["print-missing-docs"] (NoArg Flag_PrintMissingDocs) - "print information about any undocumented entities" + Option [] ["no-print-missing-docs"] (NoArg Flag_NoPrintMissingDocs) + "don't print information about any undocumented entities" ] -- cgit v1.2.3