--- a/src/Pure/Isar/isar_document.scala Tue Jan 27 14:45:52 2009 +0100
+++ b/src/Pure/Isar/isar_document.scala Tue Jan 27 15:22:46 2009 +0100
@@ -7,7 +7,7 @@
package isabelle
-object IsarDocument
+trait IsarDocument extends IsabelleProcess
{
/* unique identifiers */
@@ -18,24 +18,24 @@
/* commands */
- def define_command(proc: IsabelleProcess, id: Command_ID, text: String) {
- proc.output_sync("Isar.define_command " + IsabelleSyntax.encode_string(id) + " " +
+ def define_command(id: Command_ID, text: String) {
+ output_sync("Isar.define_command " + IsabelleSyntax.encode_string(id) + " " +
IsabelleSyntax.encode_string(text))
}
/* documents */
- def begin_document(proc: IsabelleProcess, id: Document_ID, path: String) {
- proc.output_sync("Isar.begin_document " + IsabelleSyntax.encode_string(id) + " " +
+ def begin_document(id: Document_ID, path: String) {
+ output_sync("Isar.begin_document " + IsabelleSyntax.encode_string(id) + " " +
IsabelleSyntax.encode_string(path))
}
- def end_document(proc: IsabelleProcess, id: Document_ID) {
- proc.output_sync("Isar.end_document " + IsabelleSyntax.encode_string(id))
+ def end_document(id: Document_ID) {
+ output_sync("Isar.end_document " + IsabelleSyntax.encode_string(id))
}
- def edit_document(proc: IsabelleProcess, old_id: Document_ID, new_id: Document_ID,
+ def edit_document(old_id: Document_ID, new_id: Document_ID,
edits: List[(Command_ID, Option[Command_ID])])
{
def append_edit(edit: (Command_ID, Option[Command_ID]), result: StringBuilder)
@@ -56,6 +56,6 @@
IsabelleSyntax.append_string(new_id, buf)
buf.append(" ")
IsabelleSyntax.append_list(append_edit, edits, buf)
- proc.output_sync(buf.toString)
+ output_sync(buf.toString)
}
}