equal
deleted
inserted
replaced
191 fun gen_add_recdef tfl_fn prep_att prep_hints not_permissive raw_name R eq_srcs hints thy = |
191 fun gen_add_recdef tfl_fn prep_att prep_hints not_permissive raw_name R eq_srcs hints thy = |
192 let |
192 let |
193 val _ = requires_recdef thy; |
193 val _ = requires_recdef thy; |
194 |
194 |
195 val name = Sign.intern_const thy raw_name; |
195 val name = Sign.intern_const thy raw_name; |
196 val bname = NameSpace.base_name name; |
196 val bname = Long_Name.base_name name; |
197 val _ = writeln ("Defining recursive function " ^ quote name ^ " ..."); |
197 val _ = writeln ("Defining recursive function " ^ quote name ^ " ..."); |
198 |
198 |
199 val ((eq_names, eqs), raw_eq_atts) = apfst split_list (split_list eq_srcs); |
199 val ((eq_names, eqs), raw_eq_atts) = apfst split_list (split_list eq_srcs); |
200 val eq_atts = map (map (prep_att thy)) raw_eq_atts; |
200 val eq_atts = map (map (prep_att thy)) raw_eq_atts; |
201 |
201 |
231 (** defer_recdef(_i) **) |
231 (** defer_recdef(_i) **) |
232 |
232 |
233 fun gen_defer_recdef tfl_fn eval_thms raw_name eqs raw_congs thy = |
233 fun gen_defer_recdef tfl_fn eval_thms raw_name eqs raw_congs thy = |
234 let |
234 let |
235 val name = Sign.intern_const thy raw_name; |
235 val name = Sign.intern_const thy raw_name; |
236 val bname = NameSpace.base_name name; |
236 val bname = Long_Name.base_name name; |
237 |
237 |
238 val _ = requires_recdef thy; |
238 val _ = requires_recdef thy; |
239 val _ = writeln ("Deferred recursive function " ^ quote name ^ " ..."); |
239 val _ = writeln ("Deferred recursive function " ^ quote name ^ " ..."); |
240 |
240 |
241 val congs = eval_thms (ProofContext.init thy) raw_congs; |
241 val congs = eval_thms (ProofContext.init thy) raw_congs; |