--- a/src/Pure/proofterm.ML Sun Jun 09 20:37:39 2024 +0200
+++ b/src/Pure/proofterm.ML Sun Jun 09 20:47:30 2024 +0200
@@ -395,7 +395,7 @@
triple (list (pair (pair string (properties o Position.properties_of))
(option (term consts)))) (list (thm consts)) (proof consts) (oracles, thms, prf)
and thm consts (a, thm_node) =
- pair int (pair string (pair (pair string int) (pair (term consts) (proof_body consts))))
+ pair int (pair string (pair Thm_Name.encode (pair (term consts) (proof_body consts))))
(a, (thm_node_theory_name thm_node, (thm_node_name thm_node, (thm_node_prop thm_node,
(Future.join (thm_node_body thm_node))))));
@@ -463,7 +463,7 @@
and thm consts x =
let
val (a, (b, (c, (d, e)))) =
- pair int (pair string (pair (pair string int) (pair (term consts) (proof_body consts)))) x
+ pair int (pair string (pair Thm_Name.decode (pair (term consts) (proof_body consts)))) x
in (a, make_thm_node b c d (Future.value e) no_export) end;
in
--- a/src/Pure/thm_name.ML Sun Jun 09 20:37:39 2024 +0200
+++ b/src/Pure/thm_name.ML Sun Jun 09 20:47:30 2024 +0200
@@ -26,6 +26,8 @@
val print_suffix: T -> string
val print: T -> string
val short: T -> string
+ val encode: T XML.Encode.T
+ val decode: T XML.Decode.T
end;
structure Thm_Name: THM_NAME =
@@ -104,4 +106,10 @@
if name = "" orelse index = 0 then name
else name ^ "_" ^ string_of_int index;
+
+(* XML data representation *)
+
+val encode = let open XML.Encode in pair string int end;
+val decode = let open XML.Decode in pair string int end;
+
end;