+rules_part :: { [RdrNameRuleDecl] }
+rules_part : {- empty -} { [] }
+ | src_loc PRAGMA { case parseIface $2 $1 of
+ Succeeded (PRules rules) -> rules
+ Failed err -> pprPanic "Rules parse failed" err
+ }
+
+rules :: { [RdrNameRuleDecl] }
+ : {- empty -} { [] }
+ | rule ';' rules { $1:$3 }
+
+rule :: { RdrNameRuleDecl }
+rule : src_loc STRING rule_forall qvar_name
+ core_args '=' core_expr { IfaceRuleDecl $4 (UfRuleBody $2 $3 $5 $7) $1 }
+
+rule_forall :: { [UfBinder RdrName] }
+rule_forall : '__forall' '{' core_bndrs '}' { $3 }
+
+-----------------------------------------------------------------------------
+