src/Pure/Thy/export_theory.ML
changeset 70920 1e0ad25c94c8
parent 70919 692095bafcd9
child 70923 98d9b78b7f47
equal deleted inserted replaced
70919:692095bafcd9 70920:1e0ad25c94c8
   397           val body = encode_locale_dependency dep;
   397           val body = encode_locale_dependency dep;
   398         in XML.Elem (markup, body) end)
   398         in XML.Elem (markup, body) end)
   399       |> export_body thy "locale_dependencies";
   399       |> export_body thy "locale_dependencies";
   400 
   400 
   401 
   401 
       
   402     (* constdefs *)
       
   403 
       
   404     val constdefs =
       
   405       Defs.dest_constdefs (map Theory.defs_of (Theory.parents_of thy)) (Theory.defs_of thy)
       
   406       |> sort_by #1;
       
   407 
       
   408     val encode_constdefs =
       
   409       let open XML.Encode
       
   410       in list (pair string string) end;
       
   411 
       
   412     val _ =
       
   413       if null constdefs then () else export_body thy "constdefs" (encode_constdefs constdefs);
       
   414 
       
   415 
   402     (* parents *)
   416     (* parents *)
   403 
   417 
   404     val _ =
   418     val _ =
   405       Export.export thy \<^path_binding>\<open>theory/parents\<close>
   419       Export.export thy \<^path_binding>\<open>theory/parents\<close>
   406         [YXML.string_of_body (XML.Encode.string (cat_lines (map Context.theory_long_name parents)))];
   420         [YXML.string_of_body (XML.Encode.string (cat_lines (map Context.theory_long_name parents)))];