Run the -frule-check pass more often (when asked)
authorsimonpj@microsoft.com <unknown>
Wed, 14 Nov 2007 10:46:32 +0000 (10:46 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 14 Nov 2007 10:46:32 +0000 (10:46 +0000)
compiler/main/DynFlags.hs

index f8e9408..4d3cb46 100644 (file)
@@ -901,10 +901,15 @@ getCoreToDo dflags
 
        runWhen spec_constr CoreDoSpecConstr,
 
+       case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing },
+
        -- Final clean-up simplification:
        CoreDoSimplify (SimplPhase 0) [
          MaxSimplifierIterations max_iter
-       ]
+       ],
+
+       case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing }
+
      ]
 
 -- -----------------------------------------------------------------------------
@@ -1137,7 +1142,7 @@ dynamic_flags = [
   ,  ( "fspec-threshold",          IntSuffix (\n -> upd (\dfs -> dfs{ specThreshold = n })))
   ,  ( "fliberate-case-threshold", IntSuffix (\n -> upd (\dfs -> dfs{ specThreshold = n })))
 
-  ,  ( "frule-check", SepArg (\s -> upd (\dfs -> dfs{ ruleCheck = Just s })))
+  ,  ( "frule-check",     SepArg (\s -> upd (\dfs -> dfs{ ruleCheck = Just s })))
   ,  ( "fcontext-stack"        , IntSuffix $ \n -> upd $ \dfs -> dfs{ ctxtStkDepth = n })
 
         ------ Compiler flags -----------------------------------------------