equal
deleted
inserted
replaced
1 (* Title: Pure/Interface/proof_general.ML |
1 (* Title: Pure/Interface/proof_general.ML |
2 ID: $Id$ |
2 ID: $Id$ |
3 Author: Markus Wenzel, TU Muenchen |
3 Author: Markus Wenzel, TU Muenchen |
4 |
4 |
5 Configuration for ProofGeneral of LFCS Edinburgh. |
5 Configuration for Proof General of LFCS Edinburgh. |
6 *) |
6 *) |
7 |
7 |
8 signature PROOF_GENERAL = |
8 signature PROOF_GENERAL = |
9 sig |
9 sig |
10 val write_keywords: unit -> unit |
10 val write_keywords: unit -> unit |
134 local |
134 local |
135 |
135 |
136 fun tell_pg msg name = writeln ("Proof General, " ^ msg ^ " " ^ quote name); |
136 fun tell_pg msg name = writeln ("Proof General, " ^ msg ^ " " ^ quote name); |
137 |
137 |
138 fun isa_action action name = |
138 fun isa_action action name = |
139 let val files = map (File.sysify_path o #1) (ThyInfo.loaded_files name) in |
139 let |
140 if action = ThyInfo.Update then seq (tell_pg "this file is loaded:") files |
140 val update = (action = ThyInfo.Update); |
|
141 fun loaded ((path, _), really) = |
|
142 if update andalso not really then None |
|
143 else Some (File.sysify_path path); |
|
144 val files = mapfilter loaded (ThyInfo.loaded_files name); |
|
145 in |
|
146 if update then seq (tell_pg "this file is loaded:") files |
141 else seq (tell_pg "you can unlock the file") files |
147 else seq (tell_pg "you can unlock the file") files |
142 end; |
148 end; |
143 |
149 |
144 fun isar_action action name = |
150 fun isar_action action name = |
145 if action = ThyInfo.Update then tell_pg "this theory is loaded:" name |
151 if action = ThyInfo.Update then tell_pg "this theory is loaded:" name |
154 |
160 |
155 val help = writeln o Session.welcome; |
161 val help = writeln o Session.welcome; |
156 val show_context = Context.the_context; |
162 val show_context = Context.the_context; |
157 |
163 |
158 fun kill_goal () = |
164 fun kill_goal () = |
159 (Goals.reset_goals (); writeln ("Proof General, please clear the goals buffer.")); |
165 (Goals.reset_goals (); writeln "Proof General, please clear the goals buffer."); |
160 |
166 |
161 fun repeat_undo 0 = () |
167 fun repeat_undo 0 = () |
162 | repeat_undo n = (undo(); repeat_undo (n - 1)); |
168 | repeat_undo n = (undo(); repeat_undo (n - 1)); |
163 |
169 |
164 fun isa_restart () = |
170 fun isa_restart () = |
165 (ml_prompts ("> " ^ oct_char "372") ("- " ^ oct_char "373"); |
171 (ml_prompts ("> " ^ oct_char "372") ("- " ^ oct_char "373"); |
166 ThyInfo.touch_all_thys (); |
172 ThyInfo.touch_all_thys (); |
167 kill_goal (); |
173 kill_goal (); |
168 writeln ("Proof General, please clear the response buffer."); |
174 writeln "Proof General, please clear the response buffer."; |
169 writeln "Isabelle Proof General: Isabelle process ready!"); |
175 writeln "Isabelle Proof General: Isabelle process ready!"); |
170 |
176 |
171 |
177 |
172 (* init *) |
178 (* init *) |
173 |
179 |