Commit 83407ffc authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot
Browse files

Various documentation fixes

* Remove UnliftedFFITypes from conf. Some time ago, this extension
  was undocumented and we had to silence a warning.
  This is no longer needed.
* Use r'' in conf.py. This fixes a Sphinx warning:
  WARNING: Support for evaluating Python 2 syntax is deprecated and will be removed in Sphinx 4.0. Convert docs/users_guide/conf.py to Python 3 syntax.
* Mark GHCForeignImportPrim as documented
* Fix formatting in template_haskell.rst
* Remove 'recursive do' from the list of unsupported items in TH
parent 6a7dae4b
......@@ -38,9 +38,6 @@ nitpick_ignore = [
("extension", "DoAndIfThenElse"),
("extension", "RelaxedPolyRec"),
# See #16629
("extension", "UnliftedFFITypes"),
]
rst_prolog = """
......@@ -96,13 +93,13 @@ htmlhelp_basename = 'GHCUsersGuide'
latex_elements = {
'inputenc': '',
'utf8extra': '',
'preamble': '''
'preamble': r'''
\usepackage{fontspec}
\usepackage{makeidx}
\setsansfont{DejaVu Sans}
\setromanfont{DejaVu Serif}
\setmonofont{DejaVu Sans Mono}
\setlength{\\tymin}{45pt}
\setlength{\tymin}{45pt}
% Avoid a torrent of over-full \hbox warnings
\usepackage{microtype}
......
......@@ -18,7 +18,6 @@
-XAutoDeriveTypeable
-XDoAndIfThenElse
-XDoRec
-XGHCForeignImportPrim
-XGenerics
-XImplicitPrelude
-XJavaScriptFFI
......
......@@ -800,8 +800,8 @@ displayed.
import GHC.Hs.Decls
import GHC.Hs.Expr
import GHC.Hs.ImpExp
import Avail
import Outputable
import GHC.Types.Avail
import GHC.Utils.Outputable
import GHC.Hs.Doc
plugin :: Plugin
......
......@@ -115,6 +115,7 @@ In a few cases, even equality constraints cannot be deferred. Specifically:
This type signature contains a kind error which cannot be deferred.
- Type equalities under a forall cannot be deferred (c.f. #14605).
- Type equalities under a forall cannot be deferred (c.f. `#14605
<https://gitlab.haskell.org/ghc/ghc/issues/14605>`_).
......@@ -263,8 +263,13 @@ and is not permitted to appear nested within the type, as in the following
Primitive imports
~~~~~~~~~~~~~~~~~
GHC extends the FFI with an additional calling convention ``prim``,
e.g.: ::
.. extension:: GHCForeignImportPrim
:shortdesc: Enable prim calling convention. Intended for internal use only.
:since: 6.12.1
With :extension:`GHCForeignImportPrim`, GHC extends the FFI with an additional
calling convention ``prim``, e.g.: ::
foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #)
......
......@@ -781,7 +781,7 @@ And five warning flags:
:shortdesc: warn when an explicitly Safe Haskell module imports a Safe-Inferred one
:type: dynamic
:reverse: -Wno-inferred-safe-imports
:category:
:category: warnings
:since: 8.10.1
......@@ -815,7 +815,7 @@ And five warning flags:
:shortdesc: warn when the Safe Haskell mode is not explicitly specified.
:type: dynamic
:reverse: -Wno-missing-safe-haskell-mode
:category:
:category: warnings
:since: 8.10.1
......
......@@ -109,7 +109,7 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
plusC = [| $oneC + $twoC |]
- The precise type of a quotation depends on the types of the nested splices inside it::
- The precise type of a quotation depends on the types of the nested splices inside it::
-- Add a redundant constraint to demonstrate that constraints on the
-- monad used to build the representation are propagated when using nested
......@@ -125,9 +125,8 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
Remember, a top-level splice still requires its argument to be of type ``Q Exp``.
So then splicing in ``g`` will cause ``m`` to be instantiated to ``Q``::
h :: Int
h = $(g) -- m ~ Q
h :: Int
h = $(g) -- m ~ Q
- A *typed* expression splice is written ``$$x``, where ``x`` is
is an arbitrary expression.
......@@ -376,8 +375,6 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
However, there are some GHC-specific extensions which expression
quotations currently do not support, including
- Recursive ``do``-statements (see :ghc-ticket:`1262`)
- Type holes in typed splices (see :ghc-ticket:`10945` and
:ghc-ticket:`10946`)
......
......@@ -546,6 +546,7 @@ Sorting can be toggled with :ghc-flag:`-fsort-valid-hole-fits`
:shortdesc: Sort valid hole fits by size.
:type: dynamic
:reverse: -fno-sort-by-size-hole-fits
:category: verbosity
:default: on
......@@ -557,6 +558,7 @@ Sorting can be toggled with :ghc-flag:`-fsort-valid-hole-fits`
:shortdesc: Sort valid hole fits by subsumption.
:type: dynamic
:reverse: -fno-sort-by-subsumption-hole-fits
:category: verbosity
:default: off
......
......@@ -361,7 +361,7 @@ by saying ``-fno-wombat``.
:default: on
Use a special demand transformer for dictionary selectors.
Behaviour is unconditionally enabled starting with 8.14
Behaviour is unconditionally enabled starting with 9.2
.. ghc-flag:: -fdo-eta-reduction
:shortdesc: Enable eta-reduction. Implied by :ghc-flag:`-O`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment