[Git][ghc/ghc][master] 2 commits: users-guide: Fix a variety of broken links and syntax

Marge Bot gitlab at gitlab.haskell.org
Thu Jun 20 02:16:57 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
aa4891a7 by Ben Gamari at 2019-06-20T02:16:51Z
users-guide: Fix a variety of broken links and syntax

- - - - -
fe819dd6 by Ben Gamari at 2019-06-20T02:16:51Z
users-guide: Update -Wsafe description for #16689

We no longer emit a warning when a safe module is explicitly declared as
such.

- - - - -


5 changed files:

- docs/users_guide/bugs.rst
- docs/users_guide/codegens.rst
- docs/users_guide/extending_ghc.rst
- docs/users_guide/glasgow_exts.rst
- docs/users_guide/safe_haskell.rst


Changes:

=====================================
docs/users_guide/bugs.rst
=====================================
@@ -553,7 +553,7 @@ Bugs in GHC
          To increase the limit, use -fsimpl-tick-factor=N (default 100)
 
    with the panic being reported no matter how high a
-   :ghc-flag:`-fsimpl-tick-factor` you supply.
+   :ghc-flag:`-fsimpl-tick-factor <-fsimpl-tick-factor=⟨n⟩>` you supply.
 
    We have never found another class of programs, other than this
    contrived one, that makes GHC diverge, and fixing the problem would
@@ -585,7 +585,7 @@ Bugs in GHC
    libraries that come with GHC are probably built without this option,
    unless you built GHC yourself.
 
--  The :ghc-flag:`state hack <-fstate-hack>` optimization can result in
+-  The :ghc-flag:`state hack <-fno-state-hack>` optimization can result in
    non-obvious changes in evaluation ordering which may hide exceptions, even
    with :ghc-flag:`-fpedantic-bottoms` (see, e.g., :ghc-ticket:`7411`). For
    instance, ::


=====================================
docs/users_guide/codegens.rst
=====================================
@@ -76,6 +76,13 @@ C Code Generator (``-fvia-C``)
    single: C code generator
    single: -fvia-C
 
+.. ghc-flag:: -fvia-C
+    :shortdesc: use the C code generator
+    :type: dynamic
+    :category: warnings
+
+    Use the C code generator. Only supposed in unregisterised GHC builds.
+
 This is the oldest code generator in GHC and is generally not included
 any more having been deprecated around GHC 7.0. Select it with the
 :ghc-flag:`-fvia-C` flag.


=====================================
docs/users_guide/extending_ghc.rst
=====================================
@@ -232,9 +232,10 @@ be reset with the :ghc-flag:`-fclear-plugins` option.
     :category: plugins
 
     Clear the list of plugins previously specified with
-    :ghc-flag:`-fplugin`. This is useful in GHCi where simply removing the
-    :ghc-flag:`-fplugin` options from the command line is not possible. Instead
-    `:set -fclear-plugins` can be used.
+    :ghc-flag:`-fplugin <-fplugin=⟨module⟩>`. This is useful in GHCi where
+    simply removing the :ghc-flag:`-fplugin <-fplugin=⟨module⟩>` options from
+    the command line is not possible. Instead `:set -fclear-plugins` can be
+    used.
 
 
 As an example, in order to load the plugin exported by ``Foo.Plugin`` in


=====================================
docs/users_guide/glasgow_exts.rst
=====================================
@@ -416,6 +416,7 @@ It must be enabled in modules where either of the following occur:
 - A data family is declared with a kind other than ``Type``. Both ``Foo``
   and ``Bar``, defined below, fall into this category:
   ::
+
      class Foo a where
        data FooKey a :: TYPE 'IntRep
      class Bar (r :: RuntimeRep) where
@@ -425,6 +426,7 @@ It must be enabled in modules where either of the following occur:
   following instances of ``Foo`` and ``Bar`` as defined above fall into
   this category.
   ::
+
      instance Foo Bool where
        newtype FooKey Bool = FooKeyBoolC Int#
      instance Bar 'WordRep where


=====================================
docs/users_guide/safe_haskell.rst
=====================================
@@ -255,28 +255,29 @@ normally would.
 To achieve these properties, in the safe language dialect we disable
 completely the following features:
 
-- ``TemplateHaskell`` — Can be used to gain access to constructors and abstract
-  data types that weren't exported by a module, subverting module boundaries.
+- :extension:`TemplateHaskell` — Can be used to gain access to constructors and
+  abstract data types that weren't exported by a module, subverting module
+  boundaries.
 
 Furthermore, we restrict the following features:
 
-- ``ForeignFunctionInterface`` — Foreign import declarations that import a
-  function with a non-``IO`` type are disallowed.
+- :extension:`ForeignFunctionInterface` — Foreign import declarations that
+  import a function with a non-``IO`` type are disallowed.
 
-- ``RULES`` — Rewrite rules defined in a module M compiled with :extension:`Safe` are
-  dropped. Rules defined in Trustworthy modules that ``M`` imports are still
-  valid and will fire as usual.
+- ``RULES`` — Rewrite rules defined in a module M compiled with
+  :extension:`Safe` are dropped. Rules defined in Trustworthy modules that
+  ``M`` imports are still valid and will fire as usual.
 
-- ``OverlappingInstances`` — There is no restriction on the creation of
-  overlapping instances, but we do restrict their use at a particular call
+- :extension:`OverlappingInstances` — There is no restriction on the creation
+  of overlapping instances, but we do restrict their use at a particular call
   site. This is a detailed restriction, please refer to :ref:`Safe Overlapping
   Instances <safe-overlapping-instances>` for details.
 
-- ``GeneralisedNewtypeDeriving`` — GND is not allowed in the safe language. This
-  is due to the ability of it to violate module boundaries when module authors
-  forget to put nominal role annotations on their types as appropriate. For
-  this reason, the ``Data.Coerce`` module is also considered unsafe. We are
-  hoping to find a better solution here in the future.
+- :extension:`GeneralisedNewtypeDeriving` — GND is not allowed in the safe
+  language. This is due to the ability of it to violate module boundaries when
+  module authors forget to put nominal role annotations on their types as
+  appropriate. For this reason, the ``Data.Coerce`` module is also considered
+  unsafe. We are hoping to find a better solution here in the future.
 
 - ``GHC.Generics`` — Hand crafted instances of the ``Generic`` type class are
   not allowed in Safe Haskell. Such instances aren't strictly unsafe, but
@@ -760,7 +761,8 @@ And three warning flags:
 
     Issue a warning if the module being compiled is regarded to be safe.
     Should be used to check the safety type of modules when using safe
-    inference.
+    inference. If the module is explicitly marked as safe then no warning will
+    be issued.
 
 .. ghc-flag:: -Wtrustworthy-safe
     :shortdesc: warn if the module being compiled is marked as



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/d406a16ac22e6ad02da0d2c75212614eda09d2cb...fe819dd637842fb564524a7cf80612a3673ce14c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/d406a16ac22e6ad02da0d2c75212614eda09d2cb...fe819dd637842fb564524a7cf80612a3673ce14c
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190619/e63c6678/attachment-0001.html>


More information about the ghc-commits mailing list