[Git][ghc/ghc][master] 2 commits: Small documentation fixes

Marge Bot gitlab at gitlab.haskell.org
Sun Oct 4 05:33:27 UTC 2020



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


Commits:
b0ccba66 by Krzysztof Gogolewski at 2020-10-03T19:33:02-04:00
Small documentation fixes

- Fix formatting of code blocks and a few sphinx warnings
- Move the Void# change to 9.2, it was done right after the branch was cut
- Fix typo in linear types documentation
- Note that -Wincomplete-uni-patterns affects lazy patterns

[skip ci]

- - - - -
70dc2f09 by Karel Gardas at 2020-10-03T19:33:06-04:00
fix rts.cabal to use real arch names and not aliasses (fixes #18654)

- - - - -


8 changed files:

- docs/users_guide/9.0.1-notes.rst
- docs/users_guide/9.2.1-notes.rst
- docs/users_guide/exts/deriving_extra.rst
- docs/users_guide/exts/gadt_syntax.rst
- docs/users_guide/exts/instances.rst
- docs/users_guide/exts/linear_types.rst
- docs/users_guide/using-warnings.rst
- rts/rts.cabal.in


Changes:

=====================================
docs/users_guide/9.0.1-notes.rst
=====================================
@@ -193,7 +193,7 @@ Language
 * GHC more strictly enforces the rule that the type in the top of an instance
   declaration is not permitted to contain nested ``forall``\ s or contexts, as
   documented in :ref:`formal-instance-syntax`. For example, the following
-  examples, which previous versions of GHC would accept, are now rejected:
+  examples, which previous versions of GHC would accept, are now rejected: ::
 
     instance (forall a. C a) where ...
     instance (Show a => C a) where ...
@@ -349,9 +349,6 @@ Haddock
 - Add a known-key ``cstringLength#`` to ``GHC.CString`` that is eligible
   for constant folding by a built-in rule.
 
-- ``Void#`` is now a type synonym for the unboxed tuple ``(# #)``.
-  Code using ``Void#`` now has to enable :extension:`UnboxedTuples`.
-
 ``ghc`` library
 ~~~~~~~~~~~~~~~
 


=====================================
docs/users_guide/9.2.1-notes.rst
=====================================
@@ -11,13 +11,13 @@ Language
   impredicative types, as described in in the paper
   `A quick look at impredicativity
   <https://www.microsoft.com/en-us/research/publication/a-quick-look-at-impredicativity/>`__
- (Serrano et al, ICFP 2020).  More information here: :ref:`impredicative-polymorphism`.
- This replaces the old (undefined, flaky) behaviour of the :extension:`ImpredicativeTypes` extension.
+  (Serrano et al, ICFP 2020).  More information here: :ref:`impredicative-polymorphism`.
+  This replaces the old (undefined, flaky) behaviour of the :extension:`ImpredicativeTypes` extension.
 
 Compiler
 ~~~~~~~~
 
-- New '-Wredundant-bang-patterns' flag that enables checks for "dead" bangs.
+- New ``-Wredundant-bang-patterns`` flag that enables checks for "dead" bangs.
   For instance, given this program: ::
 
       f :: Bool -> Bool
@@ -26,4 +26,10 @@ Compiler
 
   GHC would report that the bang on ``x`` is redundant and can be removed
   since the argument was already forced in the first equation. For more
-  details see :ghc-flag:`-Wredundant-bang-patterns`
+  details see :ghc-flag:`-Wredundant-bang-patterns`.
+
+``ghc-prim`` library
+~~~~~~~~~~~~~~~~~~~~
+
+- ``Void#`` is now a type synonym for the unboxed tuple ``(# #)``.
+  Code using ``Void#`` now has to enable :extension:`UnboxedTuples`.


=====================================
docs/users_guide/exts/deriving_extra.rst
=====================================
@@ -233,7 +233,7 @@ simply force the (bottom) value of the argument using
     data V a deriving Functor
     type role V nominal
 
-will produce
+will produce ::
 
     instance Functor V where
       fmap _ z = case z of


=====================================
docs/users_guide/exts/gadt_syntax.rst
=====================================
@@ -110,7 +110,9 @@ Formal syntax for GADTs
 
 To make more precise what is and what is not permitted inside of a GADT-style
 constructor, we provide a BNF-style grammar for GADT below. Note that this
-grammar is subject to change in the future. ::
+grammar is subject to change in the future.
+
+.. code-block:: none
 
   gadt_con ::= conids '::' opt_forall opt_ctxt gadt_body
 


=====================================
docs/users_guide/exts/instances.rst
=====================================
@@ -106,7 +106,9 @@ Formal syntax for instance declaration types
 
 The top of an instance declaration only permits very specific forms of types.
 To make more precise what forms of types are or are not permitted, we provide a
-BNF-style grammar for the tops of instance declarations below: ::
+BNF-style grammar for the tops of instance declarations below.
+
+.. code-block:: none
 
   inst_top ::= 'instance' opt_forall opt_ctxt inst_head opt_where
 


=====================================
docs/users_guide/exts/linear_types.rst
=====================================
@@ -90,7 +90,7 @@ therefore constructors appear to have regular function types.
 
 ::
 
-    mkList :: [a] -> [MkT1 a]
+    mkList :: [a] -> [T1 a]
     mkList xs = map MkT1 xs
 
 Hence the linearity of type constructors is invisible when


=====================================
docs/users_guide/using-warnings.rst
=====================================
@@ -860,8 +860,8 @@ of ``-W(no-)*``.
 
 
 .. ghc-flag:: -Wincomplete-uni-patterns
-    :shortdesc: warn when a pattern match in a lambda expression or
-        pattern binding could fail
+    :shortdesc: warn when a pattern match in a lambda expression,
+        pattern binding or a lazy pattern could fail
     :type: dynamic
     :reverse: -Wno-incomplete-uni-patterns
     :category:
@@ -874,6 +874,10 @@ of ``-W(no-)*``.
         h = \[] -> 2
         Just k = f y
 
+    Furthermore, this flag also applies to lazy patterns, since they are
+    syntactic sugar for pattern bindings. For example, ``f ~(Just x) = (x,x)``
+    is equivalent to ``f y = let Just x = y in (x,x)``.
+
 .. ghc-flag:: -fmax-pmcheck-models=⟨n⟩
     :shortdesc: soft limit on the number of parallel models the pattern match
         checker should check a pattern match clause against


=====================================
rts/rts.cabal.in
=====================================
@@ -401,9 +401,9 @@ library
                  -- AutoApply is generated
                  AutoApply.cmm
 
-    if arch(i386) || arch(powerpc) || arch(powerpc64)
+    if arch(i386) || arch(ppc) || arch(ppc64)
        asm-sources: AdjustorAsm.S
-    if arch(powerpc) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
+    if arch(ppc) || arch(ppc64) || arch(s390x)
        asm-sources: StgCRunAsm.S
 
     c-sources: Adjustor.c



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1033a720abf4a23a30c5cb0dfcb18b2bae3acc68...70dc2f09a33a4c3f485d8b63e92a21955643a0b7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1033a720abf4a23a30c5cb0dfcb18b2bae3acc68...70dc2f09a33a4c3f485d8b63e92a21955643a0b7
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/20201004/9c007f0e/attachment-0001.html>


More information about the ghc-commits mailing list