-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathid.sig
More file actions
31 lines (24 loc) · 756 Bytes
/
Copy pathid.sig
File metadata and controls
31 lines (24 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(*
Name: id.mli
Created: 12/14 2004
Author: David Walker
*)
signature ID = sig
(* type of identifiers *)
type id
(* generates unique id *)
val freshid : string -> id
(* generates id equivalent to string arg *)
val makeid : string -> id
val cloneid : id -> id
(* eqid id1 id2 if id1 and id2 are the same identifier *)
val eqid : id -> id -> bool
(* leqid id1 id2 if id1 is less than id2 *)
val leqid : id -> id -> bool
(* return 0 if equal; -1 if less; 1 if greater *)
val compareid : (id * id) -> order
(* returns string representation of identifier.
id2string (makeid s) == s
id2string (freshid s) == s ^ "$" ^ i for some integer i *)
val id2string : id -> string
end