src/Tools/Code/code_preproc.ML
changeset 43122 027ed67f5d98
parent 42387 b1965c8992c8
child 44338 700008399ee5
equal deleted inserted replaced
43121:5df3777f376d 43122:027ed67f5d98
   155       o the_thmproc) thy;
   155       o the_thmproc) thy;
   156   in perhaps (perhaps_loop (perhaps_apply functrans)) end;
   156   in perhaps (perhaps_loop (perhaps_apply functrans)) end;
   157 
   157 
   158 fun preprocess thy =
   158 fun preprocess thy =
   159   let
   159   let
       
   160     val ctxt = Proof_Context.init_global thy;
   160     val pre = (Simplifier.global_context thy o #pre o the_thmproc) thy;
   161     val pre = (Simplifier.global_context thy o #pre o the_thmproc) thy;
   161   in
   162   in
   162     preprocess_functrans thy
   163     preprocess_functrans thy
   163     #> (map o apfst) (rewrite_eqn pre)
   164     #> (map o apfst) (singleton (Variable.trade (K (map (rewrite_eqn pre))) ctxt)) 
   164   end;
   165   end;
   165 
   166 
   166 fun preprocess_conv thy =
   167 fun preprocess_conv thy =
   167   let
   168   let
   168     val ctxt = Proof_Context.init_global thy;
       
   169     val pre = (Simplifier.global_context thy o #pre o the_thmproc) thy;
   169     val pre = (Simplifier.global_context thy o #pre o the_thmproc) thy;
   170   in
   170   in
   171     Simplifier.rewrite pre
   171     Simplifier.rewrite pre
   172     #> trans_conv_rule (AxClass.unoverload_conv thy)
   172     #> trans_conv_rule (AxClass.unoverload_conv thy)
   173   end;
   173   end;