70 |
70 |
71 |
71 |
72 |
72 |
73 (** additional theory data **) |
73 (** additional theory data **) |
74 |
74 |
75 structure BrowserInfoArgs = |
75 val empty_browser_info = {name = "Pure", session = []: string list, is_local = false}; |
76 struct |
76 |
|
77 structure BrowserInfoData = TheoryDataFun |
|
78 (struct |
77 val name = "Pure/browser_info"; |
79 val name = "Pure/browser_info"; |
78 type T = {name: string, session: string list, is_local: bool}; |
80 type T = {name: string, session: string list, is_local: bool}; |
79 |
81 val empty = empty_browser_info; |
80 val empty = {name = "Pure", session = [], is_local = false}; |
|
81 val copy = I; |
82 val copy = I; |
82 fun prep_ext _ = {name = "", session = [], is_local = false}; |
83 fun extend _ = {name = "", session = [], is_local = false}; |
83 fun merge _ = empty; |
84 fun merge _ _ = empty; |
84 fun print _ _ = (); |
85 fun print _ _ = (); |
85 end; |
86 end); |
86 |
87 |
87 structure BrowserInfoData = TheoryDataFun(BrowserInfoArgs); |
|
88 val _ = Context.add_setup [BrowserInfoData.init]; |
88 val _ = Context.add_setup [BrowserInfoData.init]; |
89 |
89 |
90 fun get_info thy = |
90 fun get_info thy = |
91 if Theory.eq_thy (thy, ProtoPure.thy) then BrowserInfoArgs.empty |
91 if Context.theory_name thy mem_string [Context.ProtoPureN, Context.PureN, Context.CPureN] |
|
92 then empty_browser_info |
92 else BrowserInfoData.get thy; |
93 else BrowserInfoData.get thy; |
93 |
94 |
94 |
95 |
95 |
96 |
96 (** graphs **) |
97 (** graphs **) |