[commit: ghc] master: users guide: Fix a few issues (4e3f6a0)
git at git.haskell.org
git at git.haskell.org
Thu Sep 20 14:25:52 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4e3f6a0767b57dfa54934eb4fdb27f54db7016ee/ghc
>---------------------------------------------------------------
commit 4e3f6a0767b57dfa54934eb4fdb27f54db7016ee
Author: Frank Steffahn <fdsteffahn at gmail.com>
Date: Tue Aug 21 23:37:33 2018 +0200
users guide: Fix a few issues
>---------------------------------------------------------------
4e3f6a0767b57dfa54934eb4fdb27f54db7016ee
docs/users_guide/glasgow_exts.rst | 8 ++++----
docs/users_guide/using-warnings.rst | 7 +++++--
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 3ce6a60..4fd6f1b 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -3558,10 +3558,10 @@ More details:
module M where
data R = R { a,b,c :: Int }
module X where
- import M( R(a,c) )
- f b = R { .. }
+ import M( R(R,a,c) )
+ f a b = R { .. }
- The ``R{..}`` expands to ``R{M.a=a}``, omitting ``b`` since the
+ The ``R{..}`` expands to ``R{a=a}``, omitting ``b`` since the
record field is not in scope, and omitting ``c`` since the variable
``c`` is not in scope (apart from the binding of the record selector
``c``, of course).
@@ -15340,7 +15340,7 @@ The solution is to define the instance-specific function yourself, with
a pragma to prevent it being inlined too early, and give a RULE for it: ::
instance C Bool where
- op x y = opBool
+ op = opBool
opBool :: Bool -> Bool -> Bool
{-# NOINLINE [1] opBool #-}
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index a715fc1..d93064b 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -20,13 +20,16 @@ generally likely to indicate bugs in your program. These are:
* :ghc-flag:`-Wdeprecations`
* :ghc-flag:`-Wdeprecated-flags`
* :ghc-flag:`-Wunrecognised-pragmas`
- * :ghc-flag:`-Wduplicate-constraints`
* :ghc-flag:`-Wduplicate-exports`
* :ghc-flag:`-Woverflowed-literals`
* :ghc-flag:`-Wempty-enumerations`
* :ghc-flag:`-Wmissing-fields`
* :ghc-flag:`-Wmissing-methods`
* :ghc-flag:`-Wwrong-do-bind`
+ * :ghc-flag:`-Wsimplifiable-class-constraints`
+ * :ghc-flag:`-Wtyped-holes`
+ * :ghc-flag:`-Wdeferred-type-errors`
+ * :ghc-flag:`-Wpartial-type-signatures`
* :ghc-flag:`-Wunsupported-calling-conventions`
* :ghc-flag:`-Wdodgy-foreign-imports`
* :ghc-flag:`-Winline-rule-shadowing`
@@ -286,7 +289,7 @@ of ``-W(no-)*``.
Defer variable out-of-scope errors (errors about names without a leading underscore)
until runtime. This will turn variable-out-of-scope errors into warnings.
- Using a value that depends on a typed hole produces a runtime error,
+ Using a value that depends on an out-of-scope variable produces a runtime error,
the same as :ghc-flag:`-fdefer-type-errors` (which implies this option).
See :ref:`typed-holes` and :ref:`defer-type-errors`.
More information about the ghc-commits
mailing list