More progress in type checking for rules.