src/Pure/Isar/isar_syn.ML
changeset 31327 ffa5356cc343
parent 31125 80218ee73167
child 31869 01fed718958c
equal deleted inserted replaced
31326:deddd77112b7 31327:ffa5356cc343
   294 
   294 
   295 
   295 
   296 (* use ML text *)
   296 (* use ML text *)
   297 
   297 
   298 fun propagate_env (context as Context.Proof lthy) =
   298 fun propagate_env (context as Context.Proof lthy) =
   299       Context.Proof (LocalTheory.map_contexts (ML_Context.inherit_env context) lthy)
   299       Context.Proof (LocalTheory.map_contexts (ML_Env.inherit context) lthy)
   300   | propagate_env context = context;
   300   | propagate_env context = context;
   301 
   301 
   302 fun propagate_env_prf prf = Proof.map_contexts
   302 fun propagate_env_prf prf = Proof.map_contexts
   303   (Context.proof_map (ML_Context.inherit_env (Context.Proof (Proof.context_of prf)))) prf;
   303   (Context.proof_map (ML_Env.inherit (Context.Proof (Proof.context_of prf)))) prf;
   304 
   304 
   305 val _ =
   305 val _ =
   306   OuterSyntax.command "use" "ML text from file" (K.tag_ml K.thy_decl)
   306   OuterSyntax.command "use" "ML text from file" (K.tag_ml K.thy_decl)
   307     (P.path >> (fn path => Toplevel.generic_theory (ThyInfo.exec_file false path #> propagate_env)));
   307     (P.path >> (fn path => Toplevel.generic_theory (ThyInfo.exec_file false path #> propagate_env)));
   308 
   308