thy_deps: sort Context.thy_ord;
authorwenzelm
Thu, 05 Apr 2007 00:30:32 +0200
changeset 22604 6419dcc822f1
parent 22603 76c30440c9af
child 22605 41b092e7d89a
thy_deps: sort Context.thy_ord;
src/Pure/Isar/isar_cmd.ML
--- a/src/Pure/Isar/isar_cmd.ML	Thu Apr 05 00:30:31 2007 +0200
+++ b/src/Pure/Isar/isar_cmd.ML	Thu Apr 05 00:30:32 2007 +0200
@@ -494,7 +494,8 @@
 val thy_deps = Toplevel.unknown_theory o Toplevel.keep (fn state =>
   let
     val thy = Toplevel.theory_of state;
-    val gr = rev (thy :: Theory.ancestors_of thy) |> map (fn node =>
+    val all_thys = sort Context.thy_ord (thy :: Theory.ancestors_of thy);
+    val gr = all_thys |> map (fn node =>
       let
         val name = Context.theory_name node;
         val parents = map Context.theory_name (Theory.parents_of node);