Iface linter should run on body of rules
We currently call lintUnfolding
after typechecking an unfolding read from an interface file but don't do the same for the definition of rules. I made a mistake which led to an unbound variable in a rule which caused a very obscure core lint error during the simplifier. We should also run core lint on the body of rules.
Function to modify: tcIfaceRule
, call lintUnfolding
in the same manner as tcPragExpr
.
Make sure to set the inscope variable to the bndrs bound by the rule.