39348
|
1 |
(* ========================================================================= *)
|
|
2 |
(* NAMES *)
|
39502
|
3 |
(* Copyright (c) 2004 Joe Hurd, distributed under the BSD License *)
|
39348
|
4 |
(* ========================================================================= *)
|
|
5 |
|
|
6 |
signature Name =
|
|
7 |
sig
|
|
8 |
|
|
9 |
(* ------------------------------------------------------------------------- *)
|
|
10 |
(* A type of names. *)
|
|
11 |
(* ------------------------------------------------------------------------- *)
|
|
12 |
|
|
13 |
type name
|
|
14 |
|
|
15 |
(* ------------------------------------------------------------------------- *)
|
|
16 |
(* A total ordering. *)
|
|
17 |
(* ------------------------------------------------------------------------- *)
|
|
18 |
|
|
19 |
val compare : name * name -> order
|
|
20 |
|
|
21 |
val equal : name -> name -> bool
|
|
22 |
|
|
23 |
(* ------------------------------------------------------------------------- *)
|
|
24 |
(* Fresh names. *)
|
|
25 |
(* ------------------------------------------------------------------------- *)
|
|
26 |
|
|
27 |
val newName : unit -> name
|
|
28 |
|
|
29 |
val newNames : int -> name list
|
|
30 |
|
42102
|
31 |
val variantPrime : {avoid : name -> bool} -> name -> name
|
39348
|
32 |
|
42102
|
33 |
val variantNum : {avoid : name -> bool} -> name -> name
|
39348
|
34 |
|
|
35 |
(* ------------------------------------------------------------------------- *)
|
|
36 |
(* Parsing and pretty printing. *)
|
|
37 |
(* ------------------------------------------------------------------------- *)
|
|
38 |
|
|
39 |
val pp : name Print.pp
|
|
40 |
|
|
41 |
val toString : name -> string
|
|
42 |
|
|
43 |
val fromString : string -> name
|
|
44 |
|
|
45 |
end
|