src/HOL/Nominal/nominal_primrec.ML
changeset 23758 705f25072f5c
parent 23418 c195f6f13769
child 24493 d4380e9b287b
equal deleted inserted replaced
23757:087b0a241557 23758:705f25072f5c
   386     val eqn_ts = map (fn s => readt propT s
   386     val eqn_ts = map (fn s => readt propT s
   387       handle ERROR msg => cat_error msg ("The error(s) above occurred for " ^ s)) strings;
   387       handle ERROR msg => cat_error msg ("The error(s) above occurred for " ^ s)) strings;
   388     val rec_ts = map (fn eq => head_of (fst (HOLogic.dest_eq
   388     val rec_ts = map (fn eq => head_of (fst (HOLogic.dest_eq
   389       (HOLogic.dest_Trueprop (Logic.strip_imp_concl eq))))
   389       (HOLogic.dest_Trueprop (Logic.strip_imp_concl eq))))
   390       handle TERM _ => primrec_eq_err thy "not a proper equation" eq) eqn_ts;
   390       handle TERM _ => primrec_eq_err thy "not a proper equation" eq) eqn_ts;
   391     val (_, eqn_ts') = OldInductivePackage.unify_consts thy rec_ts eqn_ts
   391     val (_, eqn_ts') = PrimrecPackage.unify_consts thy rec_ts eqn_ts
   392   in
   392   in
   393     gen_primrec_i note def alt_name
   393     gen_primrec_i note def alt_name
   394       (Option.map (map (readt dummyT)) invs)
   394       (Option.map (map (readt dummyT)) invs)
   395       (Option.map (readt dummyT) fctxt)
   395       (Option.map (readt dummyT) fctxt)
   396       (names ~~ eqn_ts' ~~ atts) thy
   396       (names ~~ eqn_ts' ~~ atts) thy