# HG changeset patch # User wenzelm # Date 1175725832 -7200 # Node ID 6419dcc822f1f34fe6d7f80915d753597460560e # Parent 76c30440c9aff995f08c127b6ceba4b3212d918d thy_deps: sort Context.thy_ord; diff -r 76c30440c9af -r 6419dcc822f1 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);