replaced ContextPosition by Position.thread_data;
authorwenzelm
Thu, 24 Jan 2008 23:51:20 +0100
changeset 25959 9ad285dbc7a4
parent 25958 bcedde463850
child 25960 1f9956e0bd89
replaced ContextPosition by Position.thread_data;
src/Pure/Isar/theory_target.ML
src/Tools/induct.ML
--- a/src/Pure/Isar/theory_target.ML	Thu Jan 24 23:51:19 2008 +0100
+++ b/src/Pure/Isar/theory_target.ML	Thu Jan 24 23:51:20 2008 +0100
@@ -119,7 +119,7 @@
     val result = th''
       |> PureThy.name_thm true true ""
       |> Goal.close_result
-      |> fold PureThy.tag_rule (ContextPosition.properties_of ctxt)
+      |> fold PureThy.tag_rule (Position.properties_of (Position.thread_data ()))
       |> PureThy.name_thm true true name;
 
     (*import fixes*)
@@ -206,7 +206,7 @@
 
 fun declare_const (ta as Target {target, is_locale, is_class, ...}) depends ((c, T), mx) lthy =
   let
-    val pos = ContextPosition.properties_of lthy;
+  val pos = Position.properties_of (Position.thread_data ());
     val xs = filter depends (#1 (ProofContext.inferred_fixes (LocalTheory.target_of lthy)));
     val U = map #2 xs ---> T;
     val (mx1, mx2, mx3) = fork_mixfix ta mx;
@@ -234,7 +234,7 @@
 
 fun abbrev (ta as Target {target, is_locale, is_class, ...}) prmode ((c, mx), t) lthy =
   let
-    val pos = ContextPosition.properties_of lthy;
+    val pos = Position.properties_of (Position.thread_data ());
     val thy_ctxt = ProofContext.init (ProofContext.theory_of lthy);
     val target_ctxt = LocalTheory.target_of lthy;
 
--- a/src/Tools/induct.ML	Thu Jan 24 23:51:19 2008 +0100
+++ b/src/Tools/induct.ML	Thu Jan 24 23:51:20 2008 +0100
@@ -308,9 +308,9 @@
 fun make_cases is_open rule =
   RuleCases.make_common is_open (Thm.theory_of_thm rule, Thm.prop_of rule);
 
-fun warn_open ctxt true =
-      legacy_feature ("open rule cases in proof method" ^ ContextPosition.str_of ctxt)
-  | warn_open _ false = ();
+fun warn_open true =
+      legacy_feature ("open rule cases in proof method" ^ Position.str_of (Position.thread_data ()))
+  | warn_open false = ();
 
 
 
@@ -336,7 +336,7 @@
 
 fun cases_tac ctxt is_open insts opt_rule facts =
   let
-    val _ = warn_open ctxt is_open;
+    val _ = warn_open is_open;
     val thy = ProofContext.theory_of ctxt;
     val cert = Thm.cterm_of thy;
 
@@ -575,7 +575,7 @@
 
 fun induct_tac ctxt is_open def_insts arbitrary taking opt_rule facts =
   let
-    val _ = warn_open ctxt is_open;
+    val _ = warn_open is_open;
     val thy = ProofContext.theory_of ctxt;
     val cert = Thm.cterm_of thy;
 
@@ -651,7 +651,7 @@
 
 fun coinduct_tac ctxt is_open inst taking opt_rule facts =
   let
-    val _ = warn_open ctxt is_open;
+    val _ = warn_open is_open;
     val thy = ProofContext.theory_of ctxt;
     val cert = Thm.cterm_of thy;