[commit: ghc] ghc-8.0: users_guide: Break up -fprint-* description (0c64467)

git at git.haskell.org git at git.haskell.org
Wed Mar 16 08:41:10 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/0c64467d349bcc038e622e5131ed21838ebf018d/ghc

>---------------------------------------------------------------

commit 0c64467d349bcc038e622e5131ed21838ebf018d
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Mar 13 12:56:37 2016 +0100

    users_guide: Break up -fprint-* description
    
    This makes it a bit easier to find the description corresponding to
    particular flags.
    
    (cherry picked from commit 9ee51da1a9a0d0c4215d8fc9dce32db63c57aa99)


>---------------------------------------------------------------

0c64467d349bcc038e622e5131ed21838ebf018d
 docs/users_guide/using.rst | 38 ++++++++++++++++++++++----------------
 1 file changed, 22 insertions(+), 16 deletions(-)

diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index 47fdd29..96bd0a1 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -609,20 +609,30 @@ See also the ``--help``, ``--version``, ``--numeric-version``, and
         representation after each compilation phase is also printed
         (excluding preprocessed and C/assembly files).
 
-.. ghc-flag:: --fprint-potential-instances
+.. ghc-flag:: -fprint-potential-instances
 
     When GHC can't find an instance for a class, it displays a short
     list of some in the instances it knows about. With this flag it
     prints *all* the instances it knows about.
 
+
+The following flags control the way in which GHC displays types in error
+messages and in GHCi:
+
+.. ghc-flag:: -fprint-unicode-syntax
+
+    When enabled GHC prints type signatures using the unicode symbols from the
+    :ghc-flag:`-XUnicodeSyntax` extension. For instance,
+
+    .. code-block:: none
+
+        ghci> :set -fprint-unicode-syntax
+        ghci> :t (>>)
+        (>>) :: ∀ (m :: * → *) a b. Monad m ⇒ m a → m b → m b
+
 .. ghc-flag:: -fprint-explicit-foralls
-              -fprint-explicit-kinds
-              -fprint-unicode-syntax
-              -fprint-explicit-coercions
-              -fprint-equality-relations
 
-    These flags control the way in which GHC displays types, in
-    error messages and in GHCi. Using :ghc-flag:`-fprint-explicit-foralls` makes
+    Using :ghc-flag:`-fprint-explicit-foralls` makes
     GHC print explicit ``forall`` quantification at the top level of a
     type; normally this is suppressed. For example, in GHCi:
 
@@ -656,6 +666,8 @@ See also the ``--help``, ``--version``, ``--numeric-version``, and
              (a Data.Type.Equality.:~: b) -> b Data.Type.Equality.:~: a
                    -- Defined in Data.Type.Equality
 
+.. ghc-flag:: -fprint-explicit-kinds
+
     Using :ghc-flag:`-fprint-explicit-kinds` makes GHC print kind arguments in
     types, which are normally suppressed. This can be important when you
     are using kind polymorphism. For example:
@@ -670,21 +682,15 @@ See also the ``--help``, ``--version``, ``--numeric-version``, and
         ghci> :t MkT
         MkT :: forall (k :: BOX) (a :: k). T k a
 
-    When :ghc-flag:`-fprint-unicode-syntax` is enabled, GHC prints type
-    signatures using the unicode symbols from the :ghc-flag:`-XUnicodeSyntax`
-    extension.
-
-    .. code-block:: none
-
-        ghci> :set -fprint-unicode-syntax
-        ghci> :t (>>)
-        (>>) :: ∀ (m :: * → *) a b. Monad m ⇒ m a → m b → m b
+.. ghc-flag:: -fprint-explicit-coercions
 
     Using :ghc-flag:`-fprint-explicit-coercions` makes GHC print coercions in
     types. When trying to prove the equality between types of different
     kinds, GHC uses type-level coercions. Users will rarely need to
     see these, as they are meant to be internal.
 
+.. ghc-flag:: -fprint-equality-relations
+
     Using :ghc-flag:`-fprint-equality-relations` tells GHC to distinguish between
     its equality relations when printing. For example, ``~`` is homogeneous
     lifted equality (the kinds of its arguments are the same) while



More information about the ghc-commits mailing list