equal
deleted
inserted
replaced
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 = |