src/Pure/PIDE/document.ML
changeset 38150 67fc24df3721
child 38355 8cb265fb12fe
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Pure/PIDE/document.ML	Thu Aug 05 14:35:35 2010 +0200
     1.3 @@ -0,0 +1,36 @@
     1.4 +(*  Title:      Pure/PIDE/document.ML
     1.5 +    Author:     Makarius
     1.6 +
     1.7 +Document as collection of named nodes, each consisting of an editable
     1.8 +list of commands.
     1.9 +*)
    1.10 +
    1.11 +signature DOCUMENT =
    1.12 +sig
    1.13 +  type state_id = string
    1.14 +  type command_id = string
    1.15 +  type version_id = string
    1.16 +  val no_id: string
    1.17 +  type edit = string * ((command_id * command_id option) list) option
    1.18 +end;
    1.19 +
    1.20 +structure Document: DOCUMENT =
    1.21 +struct
    1.22 +
    1.23 +(* unique identifiers *)
    1.24 +
    1.25 +type state_id = string;
    1.26 +type command_id = string;
    1.27 +type version_id = string;
    1.28 +
    1.29 +val no_id = "";
    1.30 +
    1.31 +
    1.32 +(* edits *)
    1.33 +
    1.34 +type edit =
    1.35 +  string *  (*node name*)
    1.36 +  ((command_id * command_id option) list) option;  (*NONE: remove, SOME: insert/remove commands*)
    1.37 +
    1.38 +end;
    1.39 +