src/Pure/PIDE/document_id.ML
author wenzelm
Tue, 09 Jul 2013 13:17:22 +0200
changeset 52563 f9a20c2c3b70
parent 52537 4b5941730bd8
child 52606 0d68d108d7e0
permissions -rw-r--r--
tuned protocol terminology; tuned signature;

(*  Title:      Pure/PIDE/document_id.ML
    Author:     Makarius

Unique identifiers for document structure.

NB: ML ticks forwards > 0, JVM ticks backwards < 0.
*)

signature DOCUMENT_ID =
sig
  type generic = int
  type version = generic
  type command = generic
  type exec = generic
  val none: generic
  val make: unit -> generic
  val parse: string -> generic
  val print: generic -> string
end;

structure Document_ID: DOCUMENT_ID =
struct

type generic = int;
type version = generic;
type command = generic;
type exec = generic;

val none = 0;
val make = Counter.make ();

val parse = Markup.parse_int;
val print = Markup.print_int;

end;