added ignored, malformed transitions;
authorwenzelm
Tue, 12 Aug 2008 21:27:59 +0200
changeset 27840 e9483ef084cc
parent 27839 0be8644c45eb
child 27841 55b028593335
added ignored, malformed transitions;
src/Pure/Isar/toplevel.ML
--- a/src/Pure/Isar/toplevel.ML	Tue Aug 12 21:27:57 2008 +0200
+++ b/src/Pure/Isar/toplevel.ML	Tue Aug 12 21:27:59 2008 +0200
@@ -57,6 +57,8 @@
   val keep: (state -> unit) -> transition -> transition
   val keep': (bool -> state -> unit) -> transition -> transition
   val imperative: (unit -> unit) -> transition -> transition
+  val ignored: Position.T -> transition
+  val malformed: Position.T -> string -> transition
   val theory: (theory -> theory) -> transition -> transition
   val generic_theory: (generic_theory -> generic_theory) -> transition -> transition
   val theory': (bool -> theory -> theory) -> transition -> transition
@@ -460,6 +462,10 @@
 fun keep f = add_trans (Keep (fn _ => f));
 fun imperative f = keep (fn _ => f ());
 
+fun ignored pos = empty |> name "<ignored>" |> position pos |> imperative I;
+fun malformed pos msg =
+  empty |> name "<malformed>" |> position pos |> imperative (fn () => error msg);
+
 val unknown_theory = imperative (fn () => warning "Unknown theory context");
 val unknown_proof = imperative (fn () => warning "Unknown proof context");
 val unknown_context = imperative (fn () => warning "Unknown context");