Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
...@@ -38,9 +38,6 @@ nitpick_ignore = [ ...@@ -38,9 +38,6 @@ nitpick_ignore = [
("extension", "DoAndIfThenElse"), ("extension", "DoAndIfThenElse"),
("extension", "RelaxedPolyRec"), ("extension", "RelaxedPolyRec"),
# See #16629
("extension", "UnliftedFFITypes"),
] ]
rst_prolog = """ rst_prolog = """
...@@ -96,13 +93,13 @@ htmlhelp_basename = 'GHCUsersGuide' ...@@ -96,13 +93,13 @@ htmlhelp_basename = 'GHCUsersGuide'
latex_elements = { latex_elements = {
'inputenc': '', 'inputenc': '',
'utf8extra': '', 'utf8extra': '',
'preamble': ''' 'preamble': r'''
\usepackage{fontspec} \usepackage{fontspec}
\usepackage{makeidx} \usepackage{makeidx}
\setsansfont{DejaVu Sans} \setsansfont{DejaVu Sans}
\setromanfont{DejaVu Serif} \setromanfont{DejaVu Serif}
\setmonofont{DejaVu Sans Mono} \setmonofont{DejaVu Sans Mono}
\setlength{\\tymin}{45pt} \setlength{\tymin}{45pt}
% Avoid a torrent of over-full \hbox warnings % Avoid a torrent of over-full \hbox warnings
\usepackage{microtype} \usepackage{microtype}
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
-XAutoDeriveTypeable -XAutoDeriveTypeable
-XDoAndIfThenElse -XDoAndIfThenElse
-XDoRec -XDoRec
-XGHCForeignImportPrim
-XGenerics -XGenerics
-XImplicitPrelude -XImplicitPrelude
-XJavaScriptFFI -XJavaScriptFFI
......
...@@ -800,8 +800,8 @@ displayed. ...@@ -800,8 +800,8 @@ displayed.
import GHC.Hs.Decls import GHC.Hs.Decls
import GHC.Hs.Expr import GHC.Hs.Expr
import GHC.Hs.ImpExp import GHC.Hs.ImpExp
import Avail import GHC.Types.Avail
import Outputable import GHC.Utils.Outputable
import GHC.Hs.Doc import GHC.Hs.Doc
plugin :: Plugin plugin :: Plugin
......
...@@ -115,6 +115,7 @@ In a few cases, even equality constraints cannot be deferred. Specifically: ...@@ -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. 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 ...@@ -263,8 +263,13 @@ and is not permitted to appear nested within the type, as in the following
Primitive imports Primitive imports
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
GHC extends the FFI with an additional calling convention ``prim``, .. extension:: GHCForeignImportPrim
e.g.: :: :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# #) foreign import prim "foo" foo :: ByteArray# -> (# Int#, Int# #)
......
...@@ -781,7 +781,7 @@ And five warning flags: ...@@ -781,7 +781,7 @@ And five warning flags:
:shortdesc: warn when an explicitly Safe Haskell module imports a Safe-Inferred one :shortdesc: warn when an explicitly Safe Haskell module imports a Safe-Inferred one
:type: dynamic :type: dynamic
:reverse: -Wno-inferred-safe-imports :reverse: -Wno-inferred-safe-imports
:category: :category: warnings
:since: 8.10.1 :since: 8.10.1
...@@ -815,7 +815,7 @@ And five warning flags: ...@@ -815,7 +815,7 @@ And five warning flags:
:shortdesc: warn when the Safe Haskell mode is not explicitly specified. :shortdesc: warn when the Safe Haskell mode is not explicitly specified.
:type: dynamic :type: dynamic
:reverse: -Wno-missing-safe-haskell-mode :reverse: -Wno-missing-safe-haskell-mode
:category: :category: warnings
:since: 8.10.1 :since: 8.10.1
......
...@@ -109,7 +109,7 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under ...@@ -109,7 +109,7 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
plusC = [| $oneC + $twoC |] 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 -- Add a redundant constraint to demonstrate that constraints on the
-- monad used to build the representation are propagated when using nested -- monad used to build the representation are propagated when using nested
...@@ -125,9 +125,8 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under ...@@ -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``. 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``:: So then splicing in ``g`` will cause ``m`` to be instantiated to ``Q``::
h :: Int h :: Int
h = $(g) -- m ~ Q h = $(g) -- m ~ Q
- A *typed* expression splice is written ``$$x``, where ``x`` is - A *typed* expression splice is written ``$$x``, where ``x`` is
is an arbitrary expression. is an arbitrary expression.
...@@ -376,8 +375,6 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under ...@@ -376,8 +375,6 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
However, there are some GHC-specific extensions which expression However, there are some GHC-specific extensions which expression
quotations currently do not support, including quotations currently do not support, including
- Recursive ``do``-statements (see :ghc-ticket:`1262`)
- Type holes in typed splices (see :ghc-ticket:`10945` and - Type holes in typed splices (see :ghc-ticket:`10945` and
:ghc-ticket:`10946`) :ghc-ticket:`10946`)
......
...@@ -546,6 +546,7 @@ Sorting can be toggled with :ghc-flag:`-fsort-valid-hole-fits` ...@@ -546,6 +546,7 @@ Sorting can be toggled with :ghc-flag:`-fsort-valid-hole-fits`
:shortdesc: Sort valid hole fits by size. :shortdesc: Sort valid hole fits by size.
:type: dynamic :type: dynamic
:reverse: -fno-sort-by-size-hole-fits :reverse: -fno-sort-by-size-hole-fits
:category: verbosity
:default: on :default: on
...@@ -557,6 +558,7 @@ Sorting can be toggled with :ghc-flag:`-fsort-valid-hole-fits` ...@@ -557,6 +558,7 @@ Sorting can be toggled with :ghc-flag:`-fsort-valid-hole-fits`
:shortdesc: Sort valid hole fits by subsumption. :shortdesc: Sort valid hole fits by subsumption.
:type: dynamic :type: dynamic
:reverse: -fno-sort-by-subsumption-hole-fits :reverse: -fno-sort-by-subsumption-hole-fits
:category: verbosity
:default: off :default: off
......
...@@ -361,7 +361,7 @@ by saying ``-fno-wombat``. ...@@ -361,7 +361,7 @@ by saying ``-fno-wombat``.
:default: on :default: on
Use a special demand transformer for dictionary selectors. 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 .. ghc-flag:: -fdo-eta-reduction
:shortdesc: Enable eta-reduction. Implied by :ghc-flag:`-O`. :shortdesc: Enable eta-reduction. Implied by :ghc-flag:`-O`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment