equal
deleted
inserted
replaced
175 |
175 |
176 (* add_thms(s) *) |
176 (* add_thms(s) *) |
177 |
177 |
178 fun add_thms_atts pre_name ((b, thms), atts) = |
178 fun add_thms_atts pre_name ((b, thms), atts) = |
179 enter_thms pre_name (name_thms false true Position.none) |
179 enter_thms pre_name (name_thms false true Position.none) |
180 (foldl_map (Thm.theory_attributes atts)) (b, thms); |
180 (Library.foldl_map (Thm.theory_attributes atts)) (b, thms); |
181 |
181 |
182 fun gen_add_thmss pre_name = |
182 fun gen_add_thmss pre_name = |
183 fold_map (add_thms_atts pre_name); |
183 fold_map (add_thms_atts pre_name); |
184 |
184 |
185 fun gen_add_thms pre_name args = |
185 fun gen_add_thms pre_name args = |
205 let |
205 let |
206 val pos = Binding.pos_of b; |
206 val pos = Binding.pos_of b; |
207 val name = Sign.full_name thy b; |
207 val name = Sign.full_name thy b; |
208 val _ = Position.report (Markup.fact_decl name) pos; |
208 val _ = Position.report (Markup.fact_decl name) pos; |
209 |
209 |
210 fun app (x, (ths, atts)) = foldl_map (Thm.theory_attributes atts) (x, ths); |
210 fun app (x, (ths, atts)) = Library.foldl_map (Thm.theory_attributes atts) (x, ths); |
211 val (thms, thy') = thy |> enter_thms |
211 val (thms, thy') = thy |> enter_thms |
212 (name_thmss true pos) (name_thms false true pos) (apsnd flat o foldl_map app) |
212 (name_thmss true pos) (name_thms false true pos) (apsnd flat o Library.foldl_map app) |
213 (b, map (fn (ths, atts) => (ths, surround tag (atts @ more_atts))) ths_atts); |
213 (b, map (fn (ths, atts) => (ths, surround tag (atts @ more_atts))) ths_atts); |
214 in ((name, thms), thy') end); |
214 in ((name, thms), thy') end); |
215 |
215 |
216 in |
216 in |
217 |
217 |