src/ZF/Tools/datatype_package.ML
changeset 39288 f1ae2493d93f
parent 37781 2fbbf0a48cef
child 39557 fe5722fce758
equal deleted inserted replaced
39287:d30be6791038 39288:f1ae2493d93f
   401 
   401 
   402 fun add_datatype (sdom, srec_tms) scon_ty_lists (raw_monos, raw_type_intrs, raw_type_elims) thy =
   402 fun add_datatype (sdom, srec_tms) scon_ty_lists (raw_monos, raw_type_intrs, raw_type_elims) thy =
   403   let
   403   let
   404     val ctxt = ProofContext.init_global thy;
   404     val ctxt = ProofContext.init_global thy;
   405     fun read_is strs =
   405     fun read_is strs =
   406       map (Syntax.parse_term ctxt #> Type_Infer.constrain @{typ i}) strs
   406       map (Syntax.parse_term ctxt #> Type.constraint @{typ i}) strs
   407       |> Syntax.check_terms ctxt;
   407       |> Syntax.check_terms ctxt;
   408 
   408 
   409     val rec_tms = read_is srec_tms;
   409     val rec_tms = read_is srec_tms;
   410     val con_ty_lists = Ind_Syntax.read_constructs ctxt scon_ty_lists;
   410     val con_ty_lists = Ind_Syntax.read_constructs ctxt scon_ty_lists;
   411     val dom_sum =
   411     val dom_sum =