equal
deleted
inserted
replaced
224 val ((tycos, consts), _) = Code_Antiq_Data.get ctxt; |
224 val ((tycos, consts), _) = Code_Antiq_Data.get ctxt; |
225 val tycos' = fold (insert (op =)) new_tycos tycos; |
225 val tycos' = fold (insert (op =)) new_tycos tycos; |
226 val consts' = fold (insert (op =)) new_consts consts; |
226 val consts' = fold (insert (op =)) new_consts consts; |
227 val acc_code = Lazy.lazy (fn () => |
227 val acc_code = Lazy.lazy (fn () => |
228 evaluation_code (ProofContext.theory_of ctxt) "Code" tycos' consts' |
228 evaluation_code (ProofContext.theory_of ctxt) "Code" tycos' consts' |
229 |> apsnd fst); |
229 |> apsnd snd); |
230 in Code_Antiq_Data.put ((tycos', consts'), (false, acc_code)) ctxt end; |
230 in Code_Antiq_Data.put ((tycos', consts'), (false, acc_code)) ctxt end; |
231 |
231 |
232 fun register_const const = register_code [] [const]; |
232 fun register_const const = register_code [] [const]; |
233 |
233 |
234 fun print_const const all_struct_name consts_map = |
234 fun print_const const all_struct_name consts_map = |
236 |
236 |
237 fun print_code is_first const ctxt = |
237 fun print_code is_first const ctxt = |
238 let |
238 let |
239 val (_, (_, acc_code)) = Code_Antiq_Data.get ctxt; |
239 val (_, (_, acc_code)) = Code_Antiq_Data.get ctxt; |
240 val (ml_code, consts_map) = Lazy.force acc_code; |
240 val (ml_code, consts_map) = Lazy.force acc_code; |
241 val ml_code = if is_first then ml_code |
241 val ml_code = if is_first then ml_code else ""; |
242 else ""; |
|
243 val all_struct_name = "Isabelle"; |
242 val all_struct_name = "Isabelle"; |
244 in (ml_code, print_const const all_struct_name consts_map) end; |
243 in (ml_code, print_const const all_struct_name consts_map) end; |
245 |
244 |
246 in |
245 in |
247 |
246 |