src/ZF/Tools/datatype_package.ML
changeset 36610 bafd82950e24
parent 35989 3418cdf1855e
child 36692 54b64d4ad524
equal deleted inserted replaced
36609:6ed6112f0a95 36610:bafd82950e24
   399     mk_free = mk_free})
   399     mk_free = mk_free})
   400   end;
   400   end;
   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 thy;
   404     val ctxt = ProofContext.init_global thy;
   405     fun read_is strs =
   405     fun read_is strs =
   406       map (Syntax.parse_term ctxt #> TypeInfer.constrain @{typ i}) strs
   406       map (Syntax.parse_term ctxt #> TypeInfer.constrain @{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;