[commit: ghc] master: Rename -frule-check to -drule-check and document (d1ac1c3)

git at git.haskell.org git at git.haskell.org
Mon Jan 15 19:22:14 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d1ac1c337c5d200fe8a885b42d334c74fb083c2e/ghc

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

commit d1ac1c337c5d200fe8a885b42d334c74fb083c2e
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Mon Jan 15 12:37:51 2018 -0500

    Rename -frule-check to -drule-check and document
    
    Reviewers: bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4256


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

d1ac1c337c5d200fe8a885b42d334c74fb083c2e
 compiler/main/DynFlags.hs           |  2 +-
 docs/users_guide/debugging.rst      | 13 +++++++++++++
 testsuite/tests/driver/T9776.stderr |  2 +-
 testsuite/tests/driver/all.T        |  2 +-
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 4b95bfa..0c8222f 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3300,7 +3300,7 @@ dynamic_flags_deps = [
       (intSuffix (\n d -> d { liberateCaseThreshold = Just n }))
   , make_ord_flag defFlag "fno-liberate-case-threshold"
       (noArg (\d -> d { liberateCaseThreshold = Nothing }))
-  , make_ord_flag defFlag "frule-check"
+  , make_ord_flag defFlag "drule-check"
       (sepArg (\s d -> d { ruleCheck = Just s }))
   , make_ord_flag defFlag "freduction-depth"
       (intSuffix (\n d -> d { reductionDepth = treatZeroAsInf n }))
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index efa6e28..3997919 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -270,6 +270,19 @@ subexpression elimination pass.
     Dumps detailed information about all rules that fired in this
     module
 
+.. ghc-flag:: -drule-check=⟨str⟩
+    :shortdesc: Dump information about potential rule application
+    :type: dynamic
+
+    This flag is useful for debugging why a rule you expect to be firing isn't.
+
+    Rules are filtered by the user provided string, a rule is kept if a prefix
+    of its name matches the string.
+    The pass then checks whether any of these rules could apply to
+    the program but which didn't file for some reason. For example, specifying
+    ``-drule-check=SPEC`` will check whether there are any applications which
+    might be subject to a rule created by specialisation.
+
 .. ghc-flag:: -ddump-vect
     :shortdesc: Dump vectoriser input and output
     :type: dynamic
diff --git a/testsuite/tests/driver/T9776.stderr b/testsuite/tests/driver/T9776.stderr
index 328a105..0281a2d 100644
--- a/testsuite/tests/driver/T9776.stderr
+++ b/testsuite/tests/driver/T9776.stderr
@@ -1,2 +1,2 @@
-ghc-stage2: on the commandline: missing argument for flag: -frule-check
+ghc-stage2: on the commandline: missing argument for flag: -drule-check
 Usage: For basic information, try the `--help' option.
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index a63513a..976a316 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -214,7 +214,7 @@ test('write_interface_oneshot', [extra_files(['A011.hs'])], run_command,
 test('write_interface_make', [extra_files(['A011.hs'])], run_command,
      ['$MAKE -s --no-print-directory write_interface_make'])
 
-test('T9776', normal, compile_fail, ['-frule-check'])
+test('T9776', normal, compile_fail, ['-drule-check'])
 
 test('T9938', [], run_command, ['$MAKE -s --no-print-directory T9938'])
 



More information about the ghc-commits mailing list