equal
deleted
inserted
replaced
267 fun ml_tactic source ctxt = |
267 fun ml_tactic source ctxt = |
268 let |
268 let |
269 val ctxt' = ctxt |> Context.proof_map |
269 val ctxt' = ctxt |> Context.proof_map |
270 (ML_Context.expression (#pos source) |
270 (ML_Context.expression (#pos source) |
271 "fun tactic (facts: thm list) : tactic" |
271 "fun tactic (facts: thm list) : tactic" |
272 "Context.map_proof (Method.set_tactic tactic)" (ML_Lex.read_source source)); |
272 "Context.map_proof (Method.set_tactic tactic)" (ML_Lex.read_source false source)); |
273 in Context.setmp_thread_data (SOME (Context.Proof ctxt)) (ML_Tactic.get ctxt') end; |
273 in Context.setmp_thread_data (SOME (Context.Proof ctxt)) (ML_Tactic.get ctxt') end; |
274 |
274 |
275 fun tactic source ctxt = METHOD (ml_tactic source ctxt); |
275 fun tactic source ctxt = METHOD (ml_tactic source ctxt); |
276 fun raw_tactic source ctxt = RAW_METHOD (ml_tactic source ctxt); |
276 fun raw_tactic source ctxt = RAW_METHOD (ml_tactic source ctxt); |
277 |
277 |
366 fun method_setup name source cmt = |
366 fun method_setup name source cmt = |
367 Context.theory_map (ML_Context.expression (#pos source) |
367 Context.theory_map (ML_Context.expression (#pos source) |
368 "val (name, scan, comment): binding * (Proof.context -> Proof.method) context_parser * string" |
368 "val (name, scan, comment): binding * (Proof.context -> Proof.method) context_parser * string" |
369 "Context.map_theory (Method.setup name scan comment)" |
369 "Context.map_theory (Method.setup name scan comment)" |
370 (ML_Lex.read Position.none ("(" ^ ML_Syntax.make_binding name ^ ", ") @ |
370 (ML_Lex.read Position.none ("(" ^ ML_Syntax.make_binding name ^ ", ") @ |
371 ML_Lex.read_source source @ |
371 ML_Lex.read_source false source @ |
372 ML_Lex.read Position.none (", " ^ ML_Syntax.print_string cmt ^ ")"))); |
372 ML_Lex.read Position.none (", " ^ ML_Syntax.print_string cmt ^ ")"))); |
373 |
373 |
374 |
374 |
375 |
375 |
376 (** concrete syntax **) |
376 (** concrete syntax **) |