src/Tools/Code/code_runtime.ML
changeset 55188 7ca0204ece66
parent 55150 0940309ed8f1
child 55304 55ac31bc08a4
equal deleted inserted replaced
55187:6d0d93316daf 55188:7ca0204ece66
   194 (** instrumentalization **)
   194 (** instrumentalization **)
   195 
   195 
   196 fun evaluation_code thy module_name tycos consts =
   196 fun evaluation_code thy module_name tycos consts =
   197   let
   197   let
   198     val ctxt = Proof_Context.init_global thy;
   198     val ctxt = Proof_Context.init_global thy;
   199     val program = Code_Thingol.consts_program thy false consts;
   199     val program = Code_Thingol.consts_program thy consts;
   200     val (ml_modules, target_names) =
   200     val (ml_modules, target_names) =
   201       Code_Target.produce_code_for thy
   201       Code_Target.produce_code_for thy
   202         target NONE module_name [] program (map Constant consts @ map Type_Constructor tycos);
   202         target NONE module_name [] program (map Constant consts @ map Type_Constructor tycos);
   203     val ml_code = space_implode "\n\n" (map snd ml_modules);
   203     val ml_code = space_implode "\n\n" (map snd ml_modules);
   204     val (consts', tycos') = chop (length consts) target_names;
   204     val (consts', tycos') = chop (length consts) target_names;