diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2018-01-15 12:37:51 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-01-15 13:53:45 -0500 |
commit | d1ac1c337c5d200fe8a885b42d334c74fb083c2e (patch) | |
tree | ec54d5f5249d1e6e232637205b3b26dcfc4c796e | |
parent | a770226e03f09b767fdb4ce826162a5c0f29ec29 (diff) | |
download | haskell-d1ac1c337c5d200fe8a885b42d334c74fb083c2e.tar.gz |
Rename -frule-check to -drule-check and document
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4256
-rw-r--r-- | compiler/main/DynFlags.hs | 2 | ||||
-rw-r--r-- | docs/users_guide/debugging.rst | 13 | ||||
-rw-r--r-- | testsuite/tests/driver/T9776.stderr | 2 | ||||
-rw-r--r-- | 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 4b95bfaab0..0c8222f8c7 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 efa6e2808d..399791925c 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 328a105e61..0281a2d0c4 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 a63513a671..976a3169d8 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']) |