src/Pure/Thy/export_theory.scala
changeset 69992 bd3c10813cc4
parent 69988 6fa51a36b7f7
child 69996 8f2d3a27aff0
--- a/src/Pure/Thy/export_theory.scala	Tue Mar 26 14:23:18 2019 +0100
+++ b/src/Pure/Thy/export_theory.scala	Tue Mar 26 22:13:36 2019 +0100
@@ -252,7 +252,8 @@
     typargs: List[String],
     typ: Term.Typ,
     abbrev: Option[Term.Term],
-    propositional: Boolean)
+    propositional: Boolean,
+    primrec_types: List[String])
   {
     def cache(cache: Term.Cache): Const =
       Const(entity.cache(cache),
@@ -260,20 +261,23 @@
         typargs.map(cache.string(_)),
         cache.typ(typ),
         abbrev.map(cache.term(_)),
-        propositional)
+        propositional,
+        primrec_types.map(cache.string(_)))
   }
 
   def read_consts(provider: Export.Provider): List[Const] =
     provider.uncompressed_yxml(export_prefix + "consts").map((tree: XML.Tree) =>
       {
         val (entity, body) = decode_entity(Kind.CONST, tree)
-        val (syntax, (args, (typ, (abbrev, propositional)))) =
+        val (syntax, (args, (typ, (abbrev, (propositional, primrec_types))))) =
         {
           import XML.Decode._
-          pair(decode_syntax, pair(list(string),
-            pair(Term_XML.Decode.typ, pair(option(Term_XML.Decode.term), bool))))(body)
+          pair(decode_syntax,
+            pair(list(string),
+              pair(Term_XML.Decode.typ,
+                pair(option(Term_XML.Decode.term), pair(bool, list(string))))))(body)
         }
-        Const(entity, syntax, args, typ, abbrev, propositional)
+        Const(entity, syntax, args, typ, abbrev, propositional, primrec_types)
       })