[commit: ghc] wip/D4112: Make language extensions their own category in the documentation (1db8aec)
git at git.haskell.org
git at git.haskell.org
Mon Oct 23 13:16:35 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/D4112
Link : http://ghc.haskell.org/trac/ghc/changeset/1db8aecc849658732b6b3035b6b30606725fbd65/ghc
>---------------------------------------------------------------
commit 1db8aecc849658732b6b3035b6b30606725fbd65
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Oct 19 14:21:49 2017 -0400
Make language extensions their own category in the documentation
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.
>---------------------------------------------------------------
1db8aecc849658732b6b3035b6b30606725fbd65
docs/users_guide/ffi-chap.rst | 21 +-
docs/users_guide/flags.py | 309 +++++-
docs/users_guide/flags.rst | 11 -
docs/users_guide/ghci.rst | 21 +-
docs/users_guide/glasgow_exts.rst | 1397 +++++++++++----------------
docs/users_guide/phases.rst | 7 +-
docs/users_guide/safe_haskell.rst | 102 +-
docs/users_guide/what_glasgow_exts_does.rst | 62 +-
8 files changed, 925 insertions(+), 1005 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1db8aecc849658732b6b3035b6b30606725fbd65
More information about the ghc-commits
mailing list