summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-09-25 02:52:19 +0200
committerZubin <zubin.duggal@gmail.com>2021-06-25 09:15:59 +0000
commitf56f575e99b1970a30f19249d299b9d3dd7bf738 (patch)
tree5f3c45bab2c68dbeb1d3604ed7a911b02416c5f9
parent827df61afa0ce1f1f0f0dad5e13f43681b05eda8 (diff)
downloadhaskell-f56f575e99b1970a30f19249d299b9d3dd7bf738.tar.gz
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 (cherry picked from commit 83407ffc7acc00cc025b9f6ed063add9ab9f9bcc)
-rw-r--r--docs/users_guide/conf.py11
-rw-r--r--docs/users_guide/expected-undocumented-flags.txt1
-rw-r--r--docs/users_guide/ffi-chap.rst9
-rw-r--r--docs/users_guide/safe_haskell.rst4
4 files changed, 15 insertions, 10 deletions
diff --git a/docs/users_guide/conf.py b/docs/users_guide/conf.py
index 83e0215640..059d34c05c 100644
--- a/docs/users_guide/conf.py
+++ b/docs/users_guide/conf.py
@@ -42,9 +42,6 @@ nitpick_ignore = [
("extension", "DoAndIfThenElse"),
("extension", "RelaxedPolyRec"),
-
- # See #16629
- ("extension", "UnliftedFFITypes"),
]
rst_prolog = """
@@ -100,13 +97,17 @@ 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}
+\hbadness=99999
''',
}
diff --git a/docs/users_guide/expected-undocumented-flags.txt b/docs/users_guide/expected-undocumented-flags.txt
index e9d1673304..b0eb937c00 100644
--- a/docs/users_guide/expected-undocumented-flags.txt
+++ b/docs/users_guide/expected-undocumented-flags.txt
@@ -38,7 +38,6 @@
-XAutoDeriveTypeable
-XDoAndIfThenElse
-XDoRec
--XGHCForeignImportPrim
-XGenerics
-XImplicitPrelude
-XJavaScriptFFI
diff --git a/docs/users_guide/ffi-chap.rst b/docs/users_guide/ffi-chap.rst
index afa2d96e8c..b69a771a5f 100644
--- a/docs/users_guide/ffi-chap.rst
+++ b/docs/users_guide/ffi-chap.rst
@@ -249,8 +249,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# #)
diff --git a/docs/users_guide/safe_haskell.rst b/docs/users_guide/safe_haskell.rst
index b95364531f..a6de2d5c4b 100644
--- a/docs/users_guide/safe_haskell.rst
+++ b/docs/users_guide/safe_haskell.rst
@@ -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