src/Pure/Thy/export_theory.ML
changeset 68208 d9f2cf4fc002
parent 68206 dedf1a70d1fa
child 68230 9bee37c2ac2b
equal deleted inserted replaced
68207:1463c4996fb2 68208:d9f2cf4fc002
    95 
    95 
    96     val _ =
    96     val _ =
    97       export_entities "consts" export_const Sign.const_space
    97       export_entities "consts" export_const Sign.const_space
    98         (#constants (Consts.dest (Sign.consts_of thy)));
    98         (#constants (Consts.dest (Sign.consts_of thy)));
    99 
    99 
       
   100 
       
   101     (* axioms *)
       
   102 
       
   103     val encode_axiom =
       
   104       let open XML.Encode Term_XML.Encode
       
   105       in triple (list (pair string sort)) (list (pair string typ)) term end;
       
   106 
       
   107     fun export_axiom prop =
       
   108       let
       
   109         val prop' = Logic.unvarify_global prop;
       
   110         val typargs = rev (Term.add_tfrees prop' []);
       
   111         val args = rev (Term.add_frees prop' []);
       
   112       in encode_axiom (typargs, args, prop') end;
       
   113 
       
   114     val _ =
       
   115       export_entities "axioms" (K (SOME o export_axiom)) Theory.axiom_space
       
   116         (Theory.axioms_of thy);
       
   117 
   100     in () end);
   118     in () end);
   101 
   119 
   102 end;
   120 end;