Commit 4e3f6a07 authored by Frank Steffahn's avatar Frank Steffahn Committed by Ben Gamari
Browse files

users guide: Fix a few issues

parent 077b92fa
......@@ -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 #-}
......
......@@ -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`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment