| author | blanchet | 
| Fri, 23 Aug 2013 16:51:53 +0200 | |
| changeset 53159 | a5805fe4e91c | 
| parent 52606 | 0d68d108d7e0 | 
| child 63806 | c54a53ef1873 | 
| permissions | -rw-r--r-- | 
| 
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 | 11  | 
type generic = int  | 
12  | 
type version = generic  | 
|
13  | 
type command = generic  | 
|
14  | 
type exec = generic  | 
|
| 52606 | 15  | 
type execution = generic  | 
| 52531 | 16  | 
val none: generic  | 
17  | 
val make: unit -> generic  | 
|
18  | 
val parse: string -> generic  | 
|
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 | 25  | 
type generic = int;  | 
26  | 
type version = generic;  | 
|
27  | 
type command = generic;  | 
|
28  | 
type exec = generic;  | 
|
| 52606 | 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 | 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  |