300 (** Theory and context data **) |
300 (** Theory and context data **) |
301 |
301 |
302 fun struct_eq ((s1: string, ts1), (s2, ts2)) = |
302 fun struct_eq ((s1: string, ts1), (s2, ts2)) = |
303 (s1 = s2) andalso eq_list (op aconv) (ts1, ts2); |
303 (s1 = s2) andalso eq_list (op aconv) (ts1, ts2); |
304 |
304 |
305 structure Data = GenericDataFun |
305 structure Data = Generic_Data |
306 ( |
306 ( |
307 type T = ((string * term list) * Order_Tac.less_arith) list; |
307 type T = ((string * term list) * Order_Tac.less_arith) list; |
308 (* Order structures: |
308 (* Order structures: |
309 identifier of the structure, list of operations and record of theorems |
309 identifier of the structure, list of operations and record of theorems |
310 needed to set up the transitivity reasoner, |
310 needed to set up the transitivity reasoner, |
311 identifier and operations identify the structure uniquely. *) |
311 identifier and operations identify the structure uniquely. *) |
312 val empty = []; |
312 val empty = []; |
313 val extend = I; |
313 val extend = I; |
314 fun merge _ = AList.join struct_eq (K fst); |
314 fun merge data = AList.join struct_eq (K fst) data; |
315 ); |
315 ); |
316 |
316 |
317 fun print_structures ctxt = |
317 fun print_structures ctxt = |
318 let |
318 let |
319 val structs = Data.get (Context.Proof ctxt); |
319 val structs = Data.get (Context.Proof ctxt); |