src/Pure/Isar/isar_syn.ML
changeset 6735 e5138b3dbd3b
parent 6727 c8dba1da73cc
child 6742 6b5cb872d997
equal deleted inserted replaced
6734:151c07f5b70a 6735:e5138b3dbd3b
   323 val kill_proofP =
   323 val kill_proofP =
   324   OuterSyntax.improper_command "kill_proof" "abort current proof" K.control
   324   OuterSyntax.improper_command "kill_proof" "abort current proof" K.control
   325     (Scan.succeed (Toplevel.print o Toplevel.proof_to_theory IsarThy.kill_proof));
   325     (Scan.succeed (Toplevel.print o Toplevel.proof_to_theory IsarThy.kill_proof));
   326 
   326 
   327 val qed_withP =
   327 val qed_withP =
   328   OuterSyntax.improper_command "qed_with" "conclude proof, may patch name and attributes" K.qed
   328   OuterSyntax.improper_command "qed_with" "conclude proof, may patch name and attributes"
       
   329     K.qed_block
   329     (Scan.option P.name -- Scan.option P.attribs -- Scan.option (P.method -- P.interest)
   330     (Scan.option P.name -- Scan.option P.attribs -- Scan.option (P.method -- P.interest)
   330       >> (uncurry IsarThy.global_qed_with));
   331       >> (uncurry IsarThy.global_qed_with));
   331 
   332 
   332 val qedP =
   333 val qedP =
   333   OuterSyntax.command "qed" "conclude (sub-)proof" K.qed
   334   OuterSyntax.command "qed" "conclude (sub-)proof" K.qed_block
   334     (Scan.option (P.method -- P.interest) >> IsarThy.qed);
   335     (Scan.option (P.method -- P.interest) >> IsarThy.qed);
   335 
   336 
   336 val terminal_proofP =
   337 val terminal_proofP =
   337   OuterSyntax.command "by" "terminal backward proof" K.qed
   338   OuterSyntax.command "by" "terminal backward proof" K.qed
   338     (P.method -- P.interest >> IsarThy.terminal_proof);
   339     (P.method -- P.interest >> IsarThy.terminal_proof);
   361     (P.interest -- Scan.option (P.method -- P.interest)
   362     (P.interest -- Scan.option (P.method -- P.interest)
   362       >> (Toplevel.print oo (Toplevel.proof o IsarThy.proof)));
   363       >> (Toplevel.print oo (Toplevel.proof o IsarThy.proof)));
   363 
   364 
   364 
   365 
   365 (* proof history *)
   366 (* proof history *)
       
   367 
       
   368 val cannot_undoP =
       
   369   OuterSyntax.improper_command "cannot_undo" "report 'cannot undo' error message" K.control
       
   370     (P.name >> (Toplevel.print oo IsarCmd.cannot_undo));
   366 
   371 
   367 val clear_undoP =
   372 val clear_undoP =
   368   OuterSyntax.improper_command "clear_undo" "clear undo information" K.control
   373   OuterSyntax.improper_command "clear_undo" "clear undo information" K.control
   369     (Scan.succeed (Toplevel.print o IsarCmd.clear_undo));
   374     (Scan.succeed (Toplevel.print o IsarCmd.clear_undo));
   370 
   375 
   523   print_ast_translationP, token_translationP, oracleP,
   528   print_ast_translationP, token_translationP, oracleP,
   524   (*proof commands*)
   529   (*proof commands*)
   525   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, fixP, letP,
   530   theoremP, lemmaP, showP, haveP, thusP, henceP, assumeP, fixP, letP,
   526   thenP, fromP, factsP, beginP, endP, nextP, kill_proofP, qed_withP,
   531   thenP, fromP, factsP, beginP, endP, nextP, kill_proofP, qed_withP,
   527   qedP, terminal_proofP, immediate_proofP, default_proofP, refineP,
   532   qedP, terminal_proofP, immediate_proofP, default_proofP, refineP,
   528   then_refineP, proofP, clear_undoP, undoP, redoP, undosP, backP,
   533   then_refineP, proofP, cannot_undoP, clear_undoP, undoP, redoP,
   529   prevP, upP, topP,
   534   undosP, backP, prevP, upP, topP,
   530   (*diagnostic commands*)
   535   (*diagnostic commands*)
   531   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   536   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   532   print_methodsP, print_theoremsP, print_bindsP, print_lthmsP,
   537   print_methodsP, print_theoremsP, print_bindsP, print_lthmsP,
   533   print_thmsP, print_propP, print_termP, print_typeP,
   538   print_thmsP, print_propP, print_termP, print_typeP,
   534   (*system commands*)
   539   (*system commands*)