9 signature ELEMENT = |
9 signature ELEMENT = |
10 sig |
10 sig |
11 datatype ('typ, 'term) stmt = |
11 datatype ('typ, 'term) stmt = |
12 Shows of ((string * Attrib.src list) * ('term * 'term list) list) list | |
12 Shows of ((string * Attrib.src list) * ('term * 'term list) list) list | |
13 Obtains of (string * ((string * 'typ option) list * 'term list)) list |
13 Obtains of (string * ((string * 'typ option) list * 'term list)) list |
14 type statement (*= (string, string) stmt*) |
14 type statement = (string, string) stmt |
15 type statement_i (*= (typ, term) stmt*) |
15 type statement_i = (typ, term) stmt |
16 datatype ('typ, 'term, 'fact) ctxt = |
16 datatype ('typ, 'term, 'fact) ctxt = |
17 Fixes of (string * 'typ option * mixfix) list | |
17 Fixes of (string * 'typ option * mixfix) list | |
18 Constrains of (string * 'typ) list | |
18 Constrains of (string * 'typ) list | |
19 Assumes of ((string * Attrib.src list) * ('term * 'term list) list) list | |
19 Assumes of ((string * Attrib.src list) * ('term * 'term list) list) list | |
20 Defines of ((string * Attrib.src list) * ('term * 'term list)) list | |
20 Defines of ((string * Attrib.src list) * ('term * 'term list)) list | |
21 Notes of string * ((string * Attrib.src list) * ('fact * Attrib.src list) list) list |
21 Notes of string * ((string * Attrib.src list) * ('fact * Attrib.src list) list) list |
22 type context (*= (string, string, thmref) ctxt*) |
22 type context = (string, string, Facts.ref) ctxt |
23 type context_i (*= (typ, term, thm list) ctxt*) |
23 type context_i = (typ, term, thm list) ctxt |
24 val facts_map: (('typ, 'term, 'fact) ctxt -> ('a, 'b, 'c) ctxt) -> |
24 val facts_map: (('typ, 'term, 'fact) ctxt -> ('a, 'b, 'c) ctxt) -> |
25 ((string * Attrib.src list) * ('fact * Attrib.src list) list) list -> |
25 ((string * Attrib.src list) * ('fact * Attrib.src list) list) list -> |
26 ((string * Attrib.src list) * ('c * Attrib.src list) list) list |
26 ((string * Attrib.src list) * ('c * Attrib.src list) list) list |
27 val map_ctxt: {name: string -> string, |
27 val map_ctxt: {name: string -> string, |
28 var: string * mixfix -> string * mixfix, |
28 var: string * mixfix -> string * mixfix, |
97 Constrains of (string * 'typ) list | |
97 Constrains of (string * 'typ) list | |
98 Assumes of ((string * Attrib.src list) * ('term * 'term list) list) list | |
98 Assumes of ((string * Attrib.src list) * ('term * 'term list) list) list | |
99 Defines of ((string * Attrib.src list) * ('term * 'term list)) list | |
99 Defines of ((string * Attrib.src list) * ('term * 'term list)) list | |
100 Notes of string * ((string * Attrib.src list) * ('fact * Attrib.src list) list) list; |
100 Notes of string * ((string * Attrib.src list) * ('fact * Attrib.src list) list) list; |
101 |
101 |
102 type context = (string, string, thmref) ctxt; |
102 type context = (string, string, Facts.ref) ctxt; |
103 type context_i = (typ, term, thm list) ctxt; |
103 type context_i = (typ, term, thm list) ctxt; |
104 |
104 |
105 fun facts_map f facts = Notes ("", facts) |> f |> (fn Notes (_, facts') => facts'); |
105 fun facts_map f facts = Notes ("", facts) |> f |> (fn Notes (_, facts') => facts'); |
106 |
106 |
107 fun map_ctxt {name, var, typ, term, fact, attrib} = |
107 fun map_ctxt {name, var, typ, term, fact, attrib} = |