src/Pure/global_theory.ML
changeset 79366 18547955c942
parent 79358 b191339a014c
child 79367 fe0b52983b7b
equal deleted inserted replaced
79365:b5853d438dbe 79366:18547955c942
   304 fun apply_facts name_flags1 name_flags2 (b, facts) thy =
   304 fun apply_facts name_flags1 name_flags2 (b, facts) thy =
   305   let val (name, pos) = Sign.bind_name thy b in
   305   let val (name, pos) = Sign.bind_name thy b in
   306     if name = "" then app_facts facts thy |-> register_proofs (name, pos)
   306     if name = "" then app_facts facts thy |-> register_proofs (name, pos)
   307     else
   307     else
   308       let
   308       let
   309         val name_pos = Sign.bind_name thy b;
       
   310         val (thms', thy') = thy
   309         val (thms', thy') = thy
   311           |> app_facts (map (apfst (name_thms name_flags1 name_pos)) facts)
   310           |> app_facts (map (apfst (name_thms name_flags1 (name, pos))) facts)
   312           |>> name_thms name_flags2 name_pos |-> register_proofs (name, pos);
   311           |>> name_thms name_flags2 (name, pos) |-> register_proofs (name, pos);
   313         val thy'' = thy' |> add_facts (b, Lazy.value thms');
   312         val thy'' = thy' |> add_facts (b, Lazy.value thms');
   314       in (map (Thm.transfer thy'') thms', thy'') end
   313       in (map (Thm.transfer thy'') thms', thy'') end
   315   end;
   314   end;
   316 
   315 
   317 end;
   316 end;