signature STAMP functor MkStamp () :> STAMP structure GlobalStamp : STAMP
The STAMP signature provides an abstract data type representing time stamps. The MkStamp functor can be used to generate arbitrarily many stamp types. The GlobaStamp structure provides globally unique names (GUIDs).
import signature STAMP from "x-alice:/lib/data/STAMP-sig" import functor MkStamp from "x-alice:/lib/data/MkStamp" import structure GlobalStamp from "x-alice:/lib/data/GlobalStamp"
signature STAMP = sig eqtype stamp type t = stamp val stamp : unit -> stamp val toString : stamp -> string val equal : stamp * stamp -> bool val compare : stamp * stamp -> order val hash : stamp -> int end
The type of stamps.
Creates a new stamp that is different from any other stamp value that has been generated by the same structure. Raises Overflow if no more stamps are available.
Returns a string identifying the stamp z. For all stamps generated from the same structure, toString will return distinct strings.
An explicit equality function on stamps. Equivalent to op=.
A total ordering on stamps. For stamp types generated by the MkStamp functor it returns EQUAL if z1 = z2, LESS if z1 has been created before z2, and GREATER otherwise. For global stamps, the ordering is arbitrary.
A hash function on stamps.