src/Tools/Code/code_runtime.ML
changeset 41376 08240feb69c7
parent 41349 0e2a3f22f018
child 41472 f6ab14e61604
equal deleted inserted replaced
41375:7a89b4b94817 41376:08240feb69c7
   226       |> apsnd snd);
   226       |> apsnd snd);
   227   in Code_Antiq_Data.put ((tycos', consts'), (false, acc_code)) ctxt end;
   227   in Code_Antiq_Data.put ((tycos', consts'), (false, acc_code)) ctxt end;
   228 
   228 
   229 fun register_const const = register_code [] [const];
   229 fun register_const const = register_code [] [const];
   230 
   230 
   231 fun print_const const all_struct_name consts_map =
       
   232   (Long_Name.append all_struct_name o the o AList.lookup (op =) consts_map) const;
       
   233 
       
   234 fun print_code is_first const ctxt =
   231 fun print_code is_first const ctxt =
   235   let
   232   let
   236     val (_, (_, acc_code)) = Code_Antiq_Data.get ctxt;
   233     val (_, (_, acc_code)) = Code_Antiq_Data.get ctxt;
   237     val (ml_code, consts_map) = Lazy.force acc_code;
   234     val (ml_code, consts_map) = Lazy.force acc_code;
   238     val ml_code = if is_first then ml_code else "";
   235     val ml_code = if is_first then ml_code else "";
   239     val all_struct_name = "Isabelle";
   236     val body = " Isabelle." ^ the (AList.lookup (op =) consts_map const) ^ " ";
   240   in (ml_code, print_const const all_struct_name consts_map) end;
   237   in (ml_code, body) end;
   241 
   238 
   242 in
   239 in
   243 
   240 
   244 fun ml_code_antiq raw_const background =
   241 fun ml_code_antiq raw_const background =
   245   let
   242   let