merged
authorwenzelm
Tue, 27 Jul 2021 15:31:54 +0200
changeset 74072 dc98bb7a439b
parent 74069 ffbd1b7e5439 (diff)
parent 74071 b25b7c264a93 (current diff)
child 74074 2af4e088c01c
merged
--- a/src/HOL/Tools/Mirabelle/mirabelle.ML	Tue Jul 27 15:20:20 2021 +0200
+++ b/src/HOL/Tools/Mirabelle/mirabelle.ML	Tue Jul 27 15:31:54 2021 +0200
@@ -134,7 +134,10 @@
 
 fun check_theories strs =
   let
-    val theories = map read_theory_range strs;
+    fun theory_import_name s =
+      #theory_name (Resources.import_name (Session.get_name ()) Path.current s);
+    val theories = map read_theory_range strs
+      |> map (apfst theory_import_name);
     fun get_theory name =
       if null theories then SOME NONE
       else get_first (fn (a, b) => if a = name then SOME b else NONE) theories;
@@ -173,8 +176,7 @@
           fun make_commands (thy_index, (thy, segments)) =
             let
               val thy_long_name = Context.theory_long_name thy;
-              val thy_name = Context.theory_name thy;
-              val check_thy = check_theory thy_name;
+              val check_thy = check_theory thy_long_name;
               fun make_command {command = tr, prev_state = st, state = st', ...} =
                 let
                   val name = Toplevel.name_of tr;