src/Tools/Code/code_target.ML
changeset 59058 a78612c67ec0
parent 58928 23d0ffd48006
child 59083 88b0b1f28adc
equal deleted inserted replaced
59057:5b649fb2f2e1 59058:a78612c67ec0
   115 
   115 
   116 val parse_inst_ident = Parse.xname --| @{keyword "::"} -- Parse.class;
   116 val parse_inst_ident = Parse.xname --| @{keyword "::"} -- Parse.class;
   117 
   117 
   118 fun cert_syms ctxt =
   118 fun cert_syms ctxt =
   119   Code_Symbol.map_attr (apfst (cert_const ctxt)) (apfst (cert_tyco ctxt))
   119   Code_Symbol.map_attr (apfst (cert_const ctxt)) (apfst (cert_tyco ctxt))
   120     (apfst (cert_class ctxt)) ((apfst o pairself) (cert_class ctxt)) (apfst (cert_inst ctxt)) I;
   120     (apfst (cert_class ctxt)) ((apfst o apply2) (cert_class ctxt)) (apfst (cert_inst ctxt)) I;
   121 
   121 
   122 fun read_syms ctxt =
   122 fun read_syms ctxt =
   123   Code_Symbol.map_attr (apfst (read_const ctxt)) (apfst (read_tyco ctxt))
   123   Code_Symbol.map_attr (apfst (read_const ctxt)) (apfst (read_tyco ctxt))
   124     (apfst (Proof_Context.read_class ctxt)) ((apfst o pairself) (Proof_Context.read_class ctxt)) (apfst (read_inst ctxt)) I;
   124     (apfst (Proof_Context.read_class ctxt)) ((apfst o apply2) (Proof_Context.read_class ctxt)) (apfst (read_inst ctxt)) I;
   125 
   125 
   126 fun check_name is_module s =
   126 fun check_name is_module s =
   127   let
   127   let
   128     val _ = if s = "" then error "Bad empty code name" else ();
   128     val _ = if s = "" then error "Bad empty code name" else ();
   129     val xs = Long_Name.explode s;
   129     val xs = Long_Name.explode s;