summaryrefslogtreecommitdiff
path: root/docs/users_guide/flags.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in commentsKrzysztof Gogolewski2020-10-021-1/+1
| | | | [skip ci]
* Include -f{write,validate}-ide-info in the User's Guide flag referenceRyan Scott2020-09-161-0/+1
| | | | | | | Previously, these were omitted from the flag reference due to a layout oversight in `docs/users_guide/flags.{rst,py}`. Fixes #18426.
* Fix "ndecreasingIndentation" in manual (#18116)Krzysztof Gogolewski2020-06-141-2/+4
|
* Fix typos, via a Levenshtein-style correctorBrian Wignall2020-01-041-1/+1
|
* users_guide: Set flags list file encodingBen Gamari2019-11-071-1/+1
| | | | Otherwise this fails on Windows.
* doc: Write out documented flag listBen Gamari2019-10-081-1/+11
|
* users-guide: Make reverse flags addressable via :ghc-flag:Ben Gamari2019-10-081-2/+15
| | | | | Previously one could not easily link to the :reverse: flag of a ghc-flag.
* user-guide: Allow build with sphinx < 1.8Ben Gamari2018-09-201-2/+7
| | | | | Apparently the override argument to add_directive_to_domain was added in sphinx 1.8.
* users_guide: fix sphinx error caused by non-explicit overrideZejun Wu2018-09-201-12/+5
| | | | | | | | | | | | | | | | | | | | | Encouter following error when `make`: ``` Extension error: The 'ghc-flag' directive is already registered to domain std ``` as we register `ghc-flag` to `std` in `add_object_type` first and then overtride it in `add_directive_to_domain`. Test Plan: make -C utils/haddock/doc html SPHINX_BUILD=/usr/bin/sphinx-build Reviewers: austin, bgamari, patrickdoc Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5161
* users-guide: Fix build with sphinx 1.8Ben Gamari2018-09-201-2/+10
| | | | | | It seems that both add_object_type and add_directive_to_domain both register a directive. Previously sphinx didn't seem to mind this but as of Sphinx 1.8 it crashes with an exception.
* docs: remove leftovers of static flagsKrzysztof Gogolewski2018-07-121-1/+3
| | | | | | | | | | | | | | | | Remove "dynamic + :set" category from documentation, because all dynamic flags support ":set"; this is a leftover of "static + :set". Test Plan: make html Reviewers: bgamari, mpickering Reviewed By: mpickering Subscribers: mpickering, osa1, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4942
* relnotes: Rework treatment of included package listBen Gamari2017-11-271-25/+1
| | | | | | | | | | Previously the included package lists took a disproportionate amount of space in the resulting document and were difficult to maintain. Turn it into a table. Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4230
* users-guide: Disable index node generationBen Gamari2017-10-261-2/+3
| | | | | This is breaking the build on some platforms. It's unclear exactly why but I don't have time to investigate at the moment.
* Make language extensions their own category in the documentationJoachim Breitner2017-10-251-35/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I.e. instead of .. ghc-flag:: -XUnboxedTuples :shortdesc: Enable the use of unboxed tuple syntax. :type: dynamic :reverse: -XNoUnboxedTuples :category: one simply writes .. extension:: UnboxedTuples :shortdesc: Enable the use of unboxed tuple syntax. This allows language extensions to be referenced as If :extension:`UnboxedTuples` is enabled, then... This directive still creates the entries for the `-XUnboxedTuples` flag, so in particular, Set :ghc-flag:`-XUnboxedTuples` if you have to. still works, and lists of flags in general (e.g. for the manpage) include these. I also removed lots of links from the shortdesc of the extensions, when this link simply points to the section where the extension is defined. I removed the list of `-X` flags from the flag reference table, but added a table of extension under “10.1. Language options” Lots of text in the manual now refers to “extension `Foo`” rather than “flag `-XFoo`”. I consider `-XFoo` a historic artifact that stems from when language extensions were really just flags. These days, the use of `-XFoo` is (IMHO) deprecated: You should be using `LANGUAGE Foo`, or maybe the appropriate field in a `.cabal` file. See 9278994 which did this change to error messages already. Differential Revision: https://phabricator.haskell.org/D4112
* users-guide: Better error messages on incomplete ghc-flag directivesBen Gamari2017-08-221-0/+7
|
* users_guide: Convert mkUserGuidePart generation to a Sphinx extensionPatrick Dougherty2017-08-181-0/+400
This removes all dependencies the users guide had on `mkUserGuidePart`. The generation of the flag reference table and the various pieces of the man page is now entirely contained within the Spinx extension `flags.py`. You can see the man page generation on the orphan page https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghc.html The extension works by collecting all of the meta-data attached to the `ghc-flag` directives and then formatting and displaying it at `flag-print` directives. There is a single printing directive that can be customized with two options, what format to display (table, list, or block of flags) and an optional category to limit the output to (verbosity, warnings, codegen, etc.). New display formats can be added by creating a function `generate_flag_xxx` (where `xxx` is a description of the format) which takes a list of flags and a category and returns a new `xxx`. Then just add a reference in the dispatch table `handlers`. That display can now be run by passing `:type: xxx` to the `flag-print` directive. `flags.py` contains two maps of settings that can be adjusted. The first is a canonical list of flag categories, and the second sets default categories for files. The only functionality that Sphinx could not replace was the `what_glasgow_exts_does.gen.rst` file. `mkUserGuidePart` actually just reads the list of flags from `compiler/main/DynFlags.hs` which Sphinx cannot do. As the flag is deprecated, I added the list as a static file which can be updated manually. Additionally, this patch updates every single documented flag with the data from `mkUserGuidePart` to generate the reference table. Fixes #11654 and, incidentally, #12155. Reviewers: austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #11654, #12155 Differential Revision: https://phabricator.haskell.org/D3839