Skip to content
Snippets Groups Projects
Commit 47e2a28d authored by Ryan Scott's avatar Ryan Scott Committed by Ben Gamari
Browse files

Remove outdated documentation bits concerning -Wmissing-methods

In commit 503219e3, we
stopped suppressing `-Wmissing-methods` warnings on class methods
whose names begin with an underscore. However, it seems the users'
guide documentation concerning this was never updated. Let's do so.

Test Plan: Read it

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #12959

Differential Revision: https://phabricator.haskell.org/D4476
parent 94f02547
No related merge requests found
......@@ -11139,7 +11139,7 @@ configurable by a few flags.
(and originally defined in ‘GHC.List’))
 
where the substitutions are ordered by the order they were defined and
imported in, with all local bindings before global bindings.
imported in, with all local bindings before global bindings.
 
.. ghc-flag:: -fmax-valid-substitutions=⟨n⟩
:shortdesc: *default: 6.* Set the maximum number of valid substitutions for
......@@ -11215,7 +11215,7 @@ it will additionally offer up a list of refinement substitutions, in this case:
 
Which shows that the hole could be replaced with e.g. ``foldl1 _``. While not
fixing the hole, this can help users understand what options they have.
.. ghc-flag:: -frefinement-level-substitutions=⟨n⟩
:shortdesc: *default: off.* Sets the level of refinement of the
refinement substitutions, where level ``n`` means that substitutions
......@@ -13778,9 +13778,8 @@ Conjunction binds stronger than disjunction.
 
If no ``MINIMAL`` pragma is given in the class declaration, it is just as if
a pragma ``{-# MINIMAL op1, op2, ..., opn #-}`` was given, where the
``opi`` are the methods (a) that lack a default method in the class
declaration, and (b) whose name that does not start with an underscore
(c.f. :ghc-flag:`-Wmissing-methods`, :ref:`options-sanity`).
``opi`` are the methods that lack a default method in the class
declaration (c.f. :ghc-flag:`-Wmissing-methods`, :ref:`options-sanity`).
 
This warning can be turned off with the flag
:ghc-flag:`-Wno-missing-methods <-Wmissing-methods>`.
......
......@@ -925,18 +925,6 @@ of ``-W(no-)*``.
declaration is missing one or more methods, and the corresponding
class declaration has no default declaration for them.
The warning is suppressed if the method name begins with an
underscore. Here's an example where this is useful: ::
class C a where
_simpleFn :: a -> String
complexFn :: a -> a -> String
complexFn x y = ... _simpleFn ...
The idea is that: (a) users of the class will only call
``complexFn``; never ``_simpleFn``; and (b) instance declarations
can define either ``complexFn`` or ``_simpleFn``.
The ``MINIMAL`` pragma can be used to change which combination of
methods will be required for instances of a particular class. See
:ref:`minimal-pragma`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment