src/Pure/PIDE/document_id.ML
author wenzelm
Sat, 09 Aug 2014 11:43:58 +0200
changeset 57874 9c361f94b323
parent 52606 0d68d108d7e0
child 63806 c54a53ef1873
permissions -rw-r--r--
tuned comments;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
52530
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     1
(*  Title:      Pure/PIDE/document_id.ML
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     3
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     4
Unique identifiers for document structure.
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     5
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     6
NB: ML ticks forwards > 0, JVM ticks backwards < 0.
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     7
*)
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     8
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
     9
signature DOCUMENT_ID =
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    10
sig
52531
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    11
  type generic = int
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    12
  type version = generic
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    13
  type command = generic
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    14
  type exec = generic
52606
0d68d108d7e0 tuned signature;
wenzelm
parents: 52537
diff changeset
    15
  type execution = generic
52531
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    16
  val none: generic
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    17
  val make: unit -> generic
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    18
  val parse: string -> generic
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    19
  val print: generic -> string
52530
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    20
end;
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    21
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    22
structure Document_ID: DOCUMENT_ID =
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    23
struct
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    24
52531
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    25
type generic = int;
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    26
type version = generic;
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    27
type command = generic;
21f8e0e151f5 tuned signature;
wenzelm
parents: 52530
diff changeset
    28
type exec = generic;
52606
0d68d108d7e0 tuned signature;
wenzelm
parents: 52537
diff changeset
    29
type execution = generic;
52530
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    30
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    31
val none = 0;
52537
4b5941730bd8 more uniform Counter in ML and Scala;
wenzelm
parents: 52531
diff changeset
    32
val make = Counter.make ();
52530
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    33
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    34
val parse = Markup.parse_int;
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    35
val print = Markup.print_int;
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    36
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    37
end;
99dd8b4ef3fe explicit module Document_ID as source of globally unique identifiers across ML/Scala;
wenzelm
parents:
diff changeset
    38