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 /smlnj-lib/trunk/Util/atom-sig.sml
ViewVC logotype

Annotation of /smlnj-lib/trunk/Util/atom-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2144 - (view) (download)

1 : monnier 2 (* atom-sig.sml
2 :     *
3 :     * COPYRIGHT (c) 1996 by AT&T Research
4 :     *
5 :     * AUTHOR: John Reppy
6 :     * AT&T Bell Laboratories
7 :     * Murray Hill, NJ 07974
8 :     * jhr@research.att.com
9 :     *
10 :     * TODO: add a gensym operation?
11 :     *)
12 :    
13 :     signature ATOM =
14 :     sig
15 :    
16 :     type atom
17 :     (* Atoms are hashed strings that support fast equality testing. *)
18 :    
19 :     val atom : string -> atom
20 :     val atom' : substring -> atom
21 :     (* Map a string/substring to the corresponding unique atom. *)
22 : jhr 1756
23 : monnier 2 val toString : atom -> string
24 :     (* return the string representation of the atom *)
25 : jhr 1756
26 :     val same : (atom * atom) -> bool
27 : monnier 2 val sameAtom : (atom * atom) -> bool
28 : jhr 1756 (* return true if the atoms are the same; we provide "sameAtom" for
29 :     * backward compatibility.
30 :     *)
31 :    
32 : monnier 2 val compare : (atom * atom) -> order
33 :     (* compare two atoms for their relative order; note that this is
34 :     * not lexical order!
35 :     *)
36 : jhr 1756 val lexCompare : (atom * atom) -> order
37 :     (* compare two atoms for their lexical order *)
38 :    
39 : monnier 2 val hash : atom -> word
40 :     (* return a hash key for the atom *)
41 :    
42 :     end (* signature ATOM *)

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