The NAMES signature


Synopsis

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.


Interface

eqtype alph
val atomName : alph -> string
val varName : int -> string

Description

eqtype alph

atomName a
returns the printname of constant a

varName i
returns the printname of variable i


Discussion

Example:
structure StandardNames : NAMES =
    struct
	type alph = string
	fun atomName (a : alph) = a : string
	fun varName i = "x"^ Int.toString i 
    end