src/Pure/codegen.ML
changeset 26626 c6231d64d264
parent 26463 9283b4185fdf
child 26700 493db7848904
equal deleted inserted replaced
26625:e0cc4169626e 26626:c6231d64d264
  1072 
  1072 
  1073 fun evaluation_oracle (thy, Evaluation t) =
  1073 fun evaluation_oracle (thy, Evaluation t) =
  1074   Logic.mk_equals (t, eval_term thy t);
  1074   Logic.mk_equals (t, eval_term thy t);
  1075 
  1075 
  1076 fun evaluation_conv ct =
  1076 fun evaluation_conv ct =
  1077   let val {thy, t, ...} = rep_cterm ct
  1077   let val thy = Thm.theory_of_cterm ct
  1078   in Thm.invoke_oracle_i thy "Pure.evaluation" (thy, Evaluation t) end;
  1078   in Thm.invoke_oracle_i thy "Pure.evaluation" (thy, Evaluation (Thm.term_of ct)) end;
  1079 
  1079 
  1080 val _ = Context.>> (Context.map_theory
  1080 val _ = Context.>> (Context.map_theory
  1081   (Theory.add_oracle ("evaluation", evaluation_oracle)));
  1081   (Theory.add_oracle ("evaluation", evaluation_oracle)));
  1082 
  1082 
  1083 
  1083