[project @ 2001-09-14 15:51:41 by simonpj]
authorsimonpj <unknown>
Fri, 14 Sep 2001 15:51:43 +0000 (15:51 +0000)
committersimonpj <unknown>
Fri, 14 Sep 2001 15:51:43 +0000 (15:51 +0000)
commit5ab261bb3fd75f45a4f219f1399be84208e12463
tree19aa60488570ab1a25be0a33682ebd9840348756
parent74a395c2cd036a82a17b3a6f3d33477ebadb66c2
[project @ 2001-09-14 15:51:41 by simonpj]
--------------------------
Add a rule-check pass
(special request by Manuel)
--------------------------

DO NOT merge with stable

The flag

-frule-check foo

will report all sites at which RULES whose name starts with "foo.."
might apply, but in fact the arguments don't match so the rule
doesn't apply.

The pass is run right after all the core-to-core passes.  (Next thing
to do: make the core-to-core script external, so you can fiddle with
it.  Meanwhile, the core-to-core script is in
DriverState.builCoreToDo
so you can move the CoreDoRuleCheck line around if you want.

The format of the report is experimental: Manuel, feel free to fiddle
with it.

Most of the code is in specialise/Rules.lhs

Incidental changes
~~~~~~~~~~~~~~~~~~
Change BuiltinRule so that the rule name is accessible
without actually successfully applying the rule.  This
change affects quite a few files in a trivial way.
16 files changed:
ghc/compiler/coreSyn/CoreFVs.lhs
ghc/compiler/coreSyn/CoreSyn.lhs
ghc/compiler/coreSyn/CoreTidy.lhs
ghc/compiler/coreSyn/CoreUnfold.lhs
ghc/compiler/coreSyn/PprCore.lhs
ghc/compiler/coreSyn/Subst.lhs
ghc/compiler/main/CmdLineOpts.lhs
ghc/compiler/main/DriverFlags.hs
ghc/compiler/main/DriverState.hs
ghc/compiler/main/MkIface.lhs
ghc/compiler/prelude/PrelRules.lhs
ghc/compiler/prelude/primops.txt
ghc/compiler/simplCore/OccurAnal.lhs
ghc/compiler/simplCore/SimplCore.lhs
ghc/compiler/simplCore/SimplMonad.lhs
ghc/compiler/specialise/Rules.lhs