src/ZF/Tools/inductive_package.ML
changeset 39288 f1ae2493d93f
parent 38522 de7984a7172b
child 39557 fe5722fce758
equal deleted inserted replaced
39287:d30be6791038 39288:f1ae2493d93f
   553 (*source version*)
   553 (*source version*)
   554 fun add_inductive (srec_tms, sdom_sum) intr_srcs
   554 fun add_inductive (srec_tms, sdom_sum) intr_srcs
   555     (raw_monos, raw_con_defs, raw_type_intrs, raw_type_elims) thy =
   555     (raw_monos, raw_con_defs, raw_type_intrs, raw_type_elims) thy =
   556   let
   556   let
   557     val ctxt = ProofContext.init_global thy;
   557     val ctxt = ProofContext.init_global thy;
   558     val read_terms = map (Syntax.parse_term ctxt #> Type_Infer.constrain Ind_Syntax.iT)
   558     val read_terms = map (Syntax.parse_term ctxt #> Type.constraint Ind_Syntax.iT)
   559       #> Syntax.check_terms ctxt;
   559       #> Syntax.check_terms ctxt;
   560 
   560 
   561     val intr_atts = map (map (Attrib.attribute thy) o snd) intr_srcs;
   561     val intr_atts = map (map (Attrib.attribute thy) o snd) intr_srcs;
   562     val sintrs = map fst intr_srcs ~~ intr_atts;
   562     val sintrs = map fst intr_srcs ~~ intr_atts;
   563     val rec_tms = read_terms srec_tms;
   563     val rec_tms = read_terms srec_tms;