NAMES
signature
signature NAMES
structure StandardNames
: NAMES
A structure of signature NAMES provides a function turning atoms to strings and a function turning integers to strings; these are used in printing expressions.
The structure StandardNames uses strings as alphabet and prints them as expected, and prints variable i as xi.
eqtype alph
val atomName : alph -> string
val varName : int -> string
eqtype alph
atomName a
varName i
Example:
structure StandardNames : NAMES = struct type alph = string fun atomName (a : alph) = a : string fun varName i = "x"^ Int.toString i end