src/Tools/Code/code_runtime.ML
changeset 43619 3803869014aa
parent 43560 d1650e3720fd
child 44663 3bc39cfe27fe
equal deleted inserted replaced
43618:1c43134ff988 43619:3803869014aa
   161   in
   161   in
   162     Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct)
   162     Thm.mk_binop iff ct (if result then @{cprop "PROP Code_Generator.holds"} else ct)
   163   end;
   163   end;
   164 
   164 
   165 val (_, raw_check_holds_oracle) = Context.>>> (Context.map_theory_result
   165 val (_, raw_check_holds_oracle) = Context.>>> (Context.map_theory_result
   166   (Thm.add_oracle (Binding.name "holds_by_evaluation",
   166   (Thm.add_oracle (@{binding holds_by_evaluation},
   167   fn (thy, evaluator, vs_t, deps, ct) => check_holds thy evaluator vs_t deps ct)));
   167   fn (thy, evaluator, vs_t, deps, ct) => check_holds thy evaluator vs_t deps ct)));
   168 
   168 
   169 fun check_holds_oracle thy evaluator ((_, vs_ty), t) deps ct =
   169 fun check_holds_oracle thy evaluator ((_, vs_ty), t) deps ct =
   170   raw_check_holds_oracle (thy, evaluator, (vs_ty, t), deps, ct);
   170   raw_check_holds_oracle (thy, evaluator, (vs_ty, t), deps, ct);
   171 
   171 
   336 
   336 
   337 (** Isar setup **)
   337 (** Isar setup **)
   338 
   338 
   339 val _ =
   339 val _ =
   340   Context.>> (Context.map_theory
   340   Context.>> (Context.map_theory
   341     (ML_Context.add_antiq (Binding.name "code") (fn _ => Args.term >> ml_code_antiq)));
   341     (ML_Context.add_antiq @{binding code} (fn _ => Args.term >> ml_code_antiq)));
   342 
   342 
   343 local
   343 local
   344 
   344 
   345 val datatypesK = "datatypes";
   345 val datatypesK = "datatypes";
   346 val functionsK = "functions";
   346 val functionsK = "functions";