HELP SCON Robert Duncan, January 1990 Union of Standard ML special constant types. CONTENTS - (Use g to access required sections) -- The Scon Module -- The Scon Type -- The Scon Module ---------------------------------------------------- signature Scon structure Scon : Scon The structure -Scon- is an autoloadable library module with the following signature: signature Scon = sig datatype scon INT of int | REAL of real | STRING of string end -- The Scon Type ------------------------------------------------------ datatype scon con INT (i : int) con REAL (r : real) con STRING (s : string) The type -scon- is the union of the three SML ``special constant'' types: integer, real and string. These types are defined in the pervasive structure -StdTypes- (see HELP * STDTYPES). They are special in that their values are denoted by lexical constants rather than by datatype constructors or by predefined variables, and they are basic to the construction of user-defined structured types. In many circumstances the handling of the three types is similar, and the -scon- type is provided as a convenience to allow such handling to be packaged into a single function. It also allows some general purpose functions to be written which work on the union type for which there would otherwise be required three separate versions. --- C.all/pml/help/scon --- Copyright University of Sussex 1991. All rights reserved. ----------