added pos_of;
authorwenzelm
Wed, 03 Sep 2008 11:26:59 +0200
changeset 28105 44054657ea56
parent 28104 c62364a6aeed
child 28106 48b9c8756020
added pos_of;
src/Pure/Isar/toplevel.ML
--- a/src/Pure/Isar/toplevel.ML	Wed Sep 03 11:18:55 2008 +0200
+++ b/src/Pure/Isar/toplevel.ML	Wed Sep 03 11:26:59 2008 +0200
@@ -46,6 +46,7 @@
   val empty: transition
   val init_of: transition -> string option
   val name_of: transition -> string
+  val pos_of: transition -> Position.T
   val str_of: transition -> string
   val name: string -> transition -> transition
   val position: Position.T -> transition -> transition
@@ -423,7 +424,8 @@
   | init_of _ = NONE;
 
 fun name_of (Transition {name, ...}) = name;
-fun str_of (Transition {name, pos, ...}) = quote name ^ Position.str_of pos;
+fun pos_of (Transition {pos, ...}) = pos;
+fun str_of tr = quote (name_of tr) ^ Position.str_of (pos_of tr);
 
 fun command_msg msg tr = msg ^ "command " ^ str_of tr;
 fun at_command tr = command_msg "At " tr ^ ".";