The Compiler structure

The Compiler structure provides access to "The Visible Compiler" of Standard ML of New Jersey. Individual modules that control the major phases of compilation can be accessed in a type-safe way by user programs. In this way such utilities as the Compilation Manager can be implemented outside of the compiler itself.


signature VISCOMP
structure Compiler : VISCOMP


structure Stats : STATS
structure Control : CONTROL
structure Source : SOURCE
structure SourceMap : SOURCE_MAP
structure ErrorMsg : ERRORMSG
structure Symbol : SYMBOL
structure StaticEnv : STATICENV
structure DynamicEnv : DYNENV
structure BareEnvironment : ENVIRONMENT
structure Environment : ENVIRONMENT
structure CoerceEnv : COERCE_ENV
structure EnvRef : ENVREF
structure ModuleId : MODULE_ID
structure SCStaticEnv : SCSTATICENV
structure Profile : PROFILE
structure CUnitUtil : CUNITUTIL
structure CMSA : CMSA
structure PersStamps : PERSSTAMPS
structure PrettyPrint : PRETTYPRINT
structure PPTable : sig
    val install_pp : string list -> (PrettyPrint.ppstream -> 'a -> unit) -> unit
structure Ast : AST
structure Lambda : sig
    type lexp
structure Compile : COMPILE
structure Interact : INTERACT
structure Machm : CODEGENERATOR
structure PrintHooks : PRINTHOOKS
structure Boot : sig
    val coreEnvRef : SCEnv.Env.environment ref
val version : {system : string, version_id : int list, date : string}
val banner : string
val architecture : string


structure Stats
Utilities for statistics gathering about compiler phases.

structure Control
Allows parameters of the compiler and interactive system to be tweaked in a simple way.

structure PrettyPrint
Provides services to user programs that want to do Oppen-style pretty printing.

structure PPTable

install_pp l f
The user defines a datatype d, whose full symbolic pathname is (e.g.) MyStruct.Substruct.d, then defines a prettyprinter
               dp : ppstream -> d -> unit 
over d, perhaps using the Oppen primitives. Then dp is installed in the pp-table via
	      install_pp ["MyStruct","Substruct","d"] dp
Subsequently, when a value of type d comes to be printed out, the interactive system uses dp for displaying the value, instead of using the default datatype prettyprinter.

structure Lambda

type lexp

structure Boot

val coreEnvRef

Tells which version of SML/NJ is running. system is typically "Standard ML of New Jersey", version_id tells major and minor version numbers, and date is spelled out in English.

The concatenation of version fields, with punctuation, typically (though not necessarily) as follows:
(system), Version (version_id), (date)
with dots separating the elements of the version_id.

A short identifier for the instruction-set architecture on which the system is running.