src/Pure/PIDE/document_id.ML
author wenzelm
Mon, 01 Apr 2024 15:37:55 +0200
changeset 80064 0d94dd2fd2d0
parent 63806 c54a53ef1873
permissions -rw-r--r--
clarified names (see also 9c00a46d69d0, c5cd7a58cf2d); NB: Simplifier.set_trace_ops overrides Pure setup for Simplifier_Trace panel, but that is hardly every used in practice;

(*  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
  type execution = 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;
type execution = generic;

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

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

end;