Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/compiler/Semant/basics/stamps.sig
ViewVC logotype

Annotation of /sml/trunk/src/compiler/Semant/basics/stamps.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download) (as text)

1 : monnier 249 (* Copyright 1996 by AT&T Bell Laboratories *)
2 : blume 587 (* Re-written by Matthias Blume (3/2000) *)
3 : monnier 249 (* stamps.sig *)
4 :    
5 :     signature STAMPS =
6 :     sig
7 : blume 587 type stamp
8 :     type ord_key = stamp (* to match signature ORD_KEY *)
9 :     type pid = PersStamps.persstamp (* for global stamps *)
10 : monnier 249
11 : blume 587 val eq : stamp * stamp -> bool
12 :     val compare : stamp * stamp -> order (* instead of "cmp" (ORD_KEY) *)
13 : monnier 249
14 : blume 587 type generator
15 :     val newGenerator : unit -> generator
16 :     val fresh : generator -> stamp
17 : monnier 249
18 : blume 587 (* Make a new "special" stamp (for things in primEnv). *)
19 :     val special : string -> stamp
20 : monnier 249
21 : blume 587 (* Make a "global" stamp (i.e., one that comes from a different
22 :     * compilation unit). Used only by the unpickler. *)
23 :     val global : { pid: pid, cnt: int } -> stamp
24 : monnier 249
25 : blume 587 (* Case analysis on the abstract type with built-in alpha-conversion
26 :     * for fresh stamps. Used by the pickler. *)
27 :     type converter
28 :     val newConverter : unit -> converter
29 :     val Case : converter -> stamp ->
30 :     { fresh : int -> 'a, (* already alpha-converted *)
31 :     global : { pid: pid, cnt: int } -> 'a,
32 :     special : string -> 'a } -> 'a
33 : monnier 249
34 : blume 587 (* testing for freshness quickly... *)
35 :     val isFresh : stamp -> bool
36 : monnier 249
37 : blume 587 (* for debugging: *)
38 :     val toString : stamp -> string
39 :     val toShortString : stamp -> string
40 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0