equal
deleted
inserted
replaced
11 val parents_of: theory -> theory list |
11 val parents_of: theory -> theory list |
12 val ancestors_of: theory -> theory list |
12 val ancestors_of: theory -> theory list |
13 val nodes_of: theory -> theory list |
13 val nodes_of: theory -> theory list |
14 val merge: theory * theory -> theory |
14 val merge: theory * theory -> theory |
15 val merge_list: theory list -> theory |
15 val merge_list: theory list -> theory |
16 val requires: theory -> string -> string -> unit |
|
17 val setup: (theory -> theory) -> unit |
16 val setup: (theory -> theory) -> unit |
18 val get_markup: theory -> Markup.T |
17 val get_markup: theory -> Markup.T |
19 val axiom_table: theory -> term Name_Space.table |
18 val axiom_table: theory -> term Name_Space.table |
20 val axiom_space: theory -> Name_Space.T |
19 val axiom_space: theory -> Name_Space.T |
21 val axioms_of: theory -> (string * term) list |
20 val axioms_of: theory -> (string * term) list |
49 val merge = Context.merge; |
48 val merge = Context.merge; |
50 |
49 |
51 fun merge_list [] = raise THEORY ("Empty merge of theories", []) |
50 fun merge_list [] = raise THEORY ("Empty merge of theories", []) |
52 | merge_list (thy :: thys) = Library.foldl merge (thy, thys); |
51 | merge_list (thy :: thys) = Library.foldl merge (thy, thys); |
53 |
52 |
54 fun requires thy name what = |
|
55 if exists (fn thy' => Context.theory_name thy' = name) (nodes_of thy) then () |
|
56 else error ("Require theory " ^ quote name ^ " as an ancestor for " ^ what); |
|
57 |
|
58 fun setup f = Context.>> (Context.map_theory f); |
53 fun setup f = Context.>> (Context.map_theory f); |
59 |
54 |
60 |
55 |
61 |
56 |
62 (** datatype thy **) |
57 (** datatype thy **) |