src/HOL/Nominal/nominal_primrec.ML
changeset 25557 ea6b11021e79
parent 24906 557a9cd9370c
child 26476 4e78281b3273
equal deleted inserted replaced
25556:8d3b7c27049b 25557:ea6b11021e79
   385     val eqn_ts = map (fn s => Syntax.read_prop_global thy s
   385     val eqn_ts = map (fn s => Syntax.read_prop_global thy s
   386       handle ERROR msg => cat_error msg ("The error(s) above occurred for " ^ s)) strings;
   386       handle ERROR msg => cat_error msg ("The error(s) above occurred for " ^ s)) strings;
   387     val rec_ts = map (fn eq => head_of (fst (HOLogic.dest_eq
   387     val rec_ts = map (fn eq => head_of (fst (HOLogic.dest_eq
   388       (HOLogic.dest_Trueprop (Logic.strip_imp_concl eq))))
   388       (HOLogic.dest_Trueprop (Logic.strip_imp_concl eq))))
   389       handle TERM _ => primrec_eq_err thy "not a proper equation" eq) eqn_ts;
   389       handle TERM _ => primrec_eq_err thy "not a proper equation" eq) eqn_ts;
   390     val (_, eqn_ts') = PrimrecPackage.unify_consts thy rec_ts eqn_ts
   390     val (_, eqn_ts') = OldPrimrecPackage.unify_consts thy rec_ts eqn_ts
   391   in
   391   in
   392     gen_primrec_i note def alt_name
   392     gen_primrec_i note def alt_name
   393       (Option.map (map (Syntax.read_term_global thy)) invs)
   393       (Option.map (map (Syntax.read_term_global thy)) invs)
   394       (Option.map (Syntax.read_term_global thy) fctxt)
   394       (Option.map (Syntax.read_term_global thy) fctxt)
   395       (names ~~ eqn_ts' ~~ atts) thy
   395       (names ~~ eqn_ts' ~~ atts) thy