src/Tools/code/code_package.ML
changeset 26939 1035c89b4c02
parent 26740 6c8cd101f875
child 27000 e8a40d8b7897
equal deleted inserted replaced
26938:64e850c3da9e 26939:1035c89b4c02
   123   CodeTarget.eval thy reff code (t, ty) args;
   123   CodeTarget.eval thy reff code (t, ty) args;
   124 
   124 
   125 fun eval evaluate term_of reff thy ct args =
   125 fun eval evaluate term_of reff thy ct args =
   126   let
   126   let
   127     val _ = if null (term_frees (term_of ct)) then () else error ("Term "
   127     val _ = if null (term_frees (term_of ct)) then () else error ("Term "
   128       ^ quote (Sign.string_of_term thy (term_of ct))
   128       ^ quote (Syntax.string_of_term_global thy (term_of ct))
   129       ^ " to be evaluated contains free variables");
   129       ^ " to be evaluated contains free variables");
   130   in evaluate thy (fn t => (t, eval_ml reff args thy)) ct end;
   130   in evaluate thy (fn t => (t, eval_ml reff args thy)) ct end;
   131 
   131 
   132 fun eval_conv reff = eval evaluate_conv Thm.term_of reff;
   132 fun eval_conv reff = eval evaluate_conv Thm.term_of reff;
   133 fun eval_term reff = eval evaluate_term I reff;
   133 fun eval_term reff = eval evaluate_term I reff;