diff options
author | Judah Jacobson <judah@users.noreply.github.com> | 2020-03-02 12:09:23 -0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-15 10:57:48 -0400 |
commit | c35c545d3f32f092c52052349f741739a844ec0f (patch) | |
tree | ec3c157dbe12dd2d016e6d5c03161b063e899d6a /docs/users_guide | |
parent | 2e82465fff5851f00449131fdc8bacd3ca95f90f (diff) | |
download | haskell-c35c545d3f32f092c52052349f741739a844ec0f.tar.gz |
Add a -no-haddock flag.
This flag undoes the effect of a previous "-haddock" flag. Having both flags makes it easier
for build systems to enable Haddock parsing in a set of global flags, but then disable it locally for
specific targets (e.g., third-party packages whose comments don't pass the validation in the latest GHC).
I added the flag to expected-undocumented-flags.txt since `-haddock` was alreadyin that list.
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/expected-undocumented-flags.txt | 1 | ||||
-rw-r--r-- | docs/users_guide/using.rst | 20 |
2 files changed, 20 insertions, 1 deletions
diff --git a/docs/users_guide/expected-undocumented-flags.txt b/docs/users_guide/expected-undocumented-flags.txt index 837c2a59e2..ea8543b58c 100644 --- a/docs/users_guide/expected-undocumented-flags.txt +++ b/docs/users_guide/expected-undocumented-flags.txt @@ -127,7 +127,6 @@ -fuse-rpaths -fversion-macros -fvia-c --haddock -haddock-opts -hpcdir -instantiated-with diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst index 86094cc9cc..7bdd421fac 100644 --- a/docs/users_guide/using.rst +++ b/docs/users_guide/using.rst @@ -1129,6 +1129,26 @@ Some flags only make sense for particular target platforms. :ref:`native code generator <native-code-gen>`. The resulting compiled code will only run on processors that support BMI2 (Intel Haswell and newer, AMD Excavator, Zen and newer). +Haddock +------- + +.. index:: + single: haddock + +.. ghc-flag:: -haddock + :shortdesc: Make the parser more strict about Haddock comments. + :type: dynamic + :reverse: -no-haddock + :category: misc + + By default, GHC ignores Haddock comments (``-- | ...`` and ``-- ^ ...``) + and does not check that they're associated with a valid term, such as a + top-level type-signature. With this flag GHC will parse Haddock comments + and include them in the interface file it produces. + + Note that this flag makes GHC's parser more strict so programs which are + accepted without Haddock may be rejected with :ghc-flag:`-haddock`. + Miscellaneous flags ------------------- |