Front End Map
-------------

A color-coded map of the directory structure is available as
a pdf file, or Omnigraffle source file.

1. Lexing and Parsing
----------------------

  * syntax trees (AST) produced by parser
  * lexical analysis (via ML-Lex spec)
  * parsing (via ML-Yacc spec)

Parse/
  lexing and parsing, producing ast (concrete syntax trees)

  Parse/ast/
  "syntax trees" (really concrete, in contrast to absyn, which is
  the true abstract syntax)
    ast.sig/sml
      the syntax tree types
      defs: AST, Ast: AST 
    astutil.sig/sml
      some utility functions
      defs: ASTUTIL, AstUtil: ASTUTIL

  Parse/lex/
  lexical analysis (via ML-Lex)
    ml.lex
      the lexer spec (ML-Lex source)
    tokentable.sml
      hash table for token recognition
      defs: TokenTable

  Parse/parse/
  parsing (via ML-Yacc)
    ml.grm
      grammar spec (ML-Yacc source)

  Parse/main/
  control flags and parser driver functions.
  lexer/parser combination translates input stream into ast trees
    parser.sig/sml
      parser modules initialization, driver function
      defs: MLPARSER, MLParser: MLPARSER
    parsercontrol.sml
      flags controlling various syntax features
      defs: PARSER_CONTROL, ParserControl
    smlfile.sml
      top level parsing functions
      defs: SMLFILE, SmlFile


2. Elaboration
--------------

  * abstract syntax (absyn)
  * static environments
  * translation from ast to abstract syntax and static environment (elaboration)
  * core type checking and inference, overloading resolution
  * modules and signatures, signature matching, functor application
  * code found in directories Semant, ElabData, Elaborator

Basics/

  Basics/mlcomp/
  some basic types involved in absyn and statenv and elaboration process
    symbol.sig/sml
      symbols (should be in ElabData)
      defs: SYMBOL, Symbol
    fastsymbol.sig/sml
      fast symbols (should be in ElabData)
      defs: FASTSYMBOL, FastSymbol
    fixity.sml
      fixity properties (should be in ElabData)
      defs: FIXITY, Fixity
    persstamps.sig/sml
      persistant stamps, or globally unique identifiers (16 byte vectors),
      aka "pids"
      defs: PERSSTAMPS, PersStamps : PERSSTAMPS
    persmap.sml
      finite maps over pids (persistent stamps)
      defs: PersMap
    pidenv.sig/sml
      environments using pids (persistant stamps) as keys
      defs: PIDENV, PidEnvFn
    compileexn.sml
      Compile exception (where used?)
      defs: CompileExn

  Basics/miscutil/  (why not in MiscUtil?)
    intstrmap.sig/sml
      int/string maps for use in environments;
      appears redundant with IntStrMapV defined in
      Env (ElabData/basics/env.sml)
      used in Tuples, ElabCore, Parse/lex/tokentable.sml.
      see: ElabData/basics/env.sml
      defs: INTSTRMAP, IntStrMap

  Basics/errormsg/
    errormsg.sig/sml
      error messages
      defs: ERRORMSG, ErrorMsg

  Basics/source/
  managing ML source files or streams
    pathnames.sig/sml
      file path names
      defs: PATHNAMES, Pathnames
    source.sig/sml
      input source datastructure
      defs: SOURCE, Source
    sourcemap.sig/sml
      map character positions in source to line no/column supporting #line "declaration"
      defs: SOURCE_MAP, SourcMap

  Basics/print/
  utilities for prettyprinting
    [pp-wrapper.sml -- obsolete for mcz, where new pp is used directly]
      implements old PP interface using new SML/NJ Lib PP
    pp-init.sml
      extend standard prettyprinter interface to match old one
      defs: PRETTYPRINT, PrettyPrint
    printutil.sig/sml
      some print utilities (uses Symbol)
      defs: PRINTUTIL, PrintUtil
    printcontrol.sml
      print control flags, out, say
      defs: PRINTCONTROL, Control_Print

  Basics/stats/
    stats.sml
      facilities for defining timed phases
      defs: STATS, Stats

  Basics/main/
    basiccontrol.sml
      printWarning control flag, topregistry
      uses: ControlRegistry, Controls
      defs: BASIC_CONTROL, BasicControl

Semant/
  Modules related to elaboration and pickling (external representation
  of static environments)

 [#Deleted: replaced by ElabData/basics/primopid.sig,sml
  Semant/basics/
    inlinfo.sig/sml
      inlining info [FLINT]
      defs: INL_INFO, InlInfo: INL_INFO
 ]

  Semant/elaborate/
  apply functors defined in corresponding Elaborate/elaborate modules
  [these could be in Elaborator]
    elabmod.sml
      module level elaboration: defines ElabMod by calling ElabModFn defined
      in Elaborate/elaborate/elabmod.sml (should go to Elaborator)
      see: Elaborator/elaborate/elabmod.sml
      defs: ElabMod
    elabtop.sml
      top-level elaboration: defined ElabTop by calling ElabTopFn defined
      in Elaborator/elaborate/elabtop.sml (should go to Elaborator)
      see: Elaborator/elaborate/elabtop.sml
      defs: ElabTop

  Semant/modules/
  support for module elaboration
    evalent.sml
      entity expression evaluation;
      applies functor EvalEntityFn from Elaborator/modules/evalent.sml
      see: Elaborator/modules/evalent.sml
      defs: EvalEntity
    instantiate.sml
      apply InstantitateFn defined in Elaborator/modules/instantiate.sml
      see: Elaborator/modules/instantiate.sml
      defs: Instantiate
    instantiate-param.sml
      defines parameter passed to InstantiateFn in ./instantiate.sml
      see: Semant/modules/instantiate.sml  (previous file)
      defs: InstantiateParam
    module-plists.sml [FLINT]
      defines PropList properties for attaching FLINT Lambda types to
      various semantic entities
      see: smlnj-lib/Util/plist{-sig}.sml
      defs: ModulePropLists
    sigmatch.sml
      apply SigmatchFn defined in Elaborator/modules/sigmatch.sml
      see: Elaborator/modules/sigmatch.sml
      defs: SigMatch

  Semant/pickle/
  pickling static environments
    pickle-sym-pid.sml
      pickling symbols and pids (persistant stamps)
      uses: PickleUtil
      defs: PickleSymPid (inline sig)
    unpickle-sym-pid.sml
      unpickling symbols and pids (persistant stamps)
      defs: UnpickleSymPid (inline sig)
    pickmod.sml
      pickling functions for each type involved in staticEnv
      defs: PICKMOD, PickMod :> PICKMOD
    unpickmod.sml
      unpickling functions for each type involved in staticEnv
      defs: UNPICKMOD, UnpickMod : UNPICKMOD
    rehash.sml
      recompute hash of an environment resulting from filtering
      a larger invironment
      defs: Rehash (inline sig)

  Semant/statenv/
  construction of base static environment for environment bootstrap
  and table mapping primop names to intrinsic primop types
    prim.sml
      define static env primEnv, containing primitive types (PrimTypes), 
      primops (InLine), and unrolled lists (UnrolledList)
      defs: PRIM_ENV, PrimEnv: PRIM_ENV  
    primoptypemap.sml
      defines mapping from primop names (strings) to their "intrinsic" types
      defs: PRIMOP_TYPE_MAP, PrimOpTypeMap

  Semant/types/
  some types-related stuff
    cproto.sml
      relating ML types and C types (CTypes.c_proto from MLRISC) for C call mechanism
      defs: CProto
    tp-var-info.sml [FLINT]
      packaging some FLINT info as an exception
      defs: TVI
    types-reformat.sml [FLINT]
      FLINT-related "reformatting" of types, used to be in typesutil.sml
      defs: TypesReformat
   [#Deleted: type checker is no longer functorized
    typecheck.sml [FLINT]
      apply TypecheckFn defined in Elaborator/types/typecheck.sml (should eliminate)
      see: Elaborator/types/typecheck.sml
      defs: TypeCheck
   ]


ElabData/
Basic datastructures used in elaboration (including type checking)

  ElabData/basics/
  basic representation types used in elaboration, plus coresym
    lambdavar.sig/sml 
      lambda variables, the abstract representation of variables, used
      as roots of dynamic access chains
      defs: LAMBDA_VAR, LambdaVar
    access.sig/sml
      dynamic access paths
      defs: ACCESS, Access : ACCESS
    env.sig/sml
      generic environments, mapping symbols to unspecified binding type
      defs: ENV, Env: ENV, INTSTRMAPV
    stamps.sig/sml
      static identifiers, used for nominal type equivalence
      defs: STAMPS, Stamps:> STAMPS
    stampmap.sml
      generic finite mappings over stamps
      defs: StampMap
    sympaths.sig/sml
      SymPath and InvPath: direct and inverse symbolic paths (selecting
      module components)
      defs: SYMPATH, INVPATH, CONVERTPATHS, SymPath, InvPath, ConvertPaths
  [#Deleted
    ii.sml [FLINT]
      FLINT related information for inlining (why is this in elaborator?)
      defs: II
  #]
    core-ptnum.sml
      core prim-type numbers (essentially the same as Elaborator/basics/ptnum.sml
      except only language-standard types are included) 
      see: Elaborator/basics/ptnum.sml
      defs: CORE_PRIM_TYC_NUM, CorePrimTycNum
    coresym.sml
      defines the special structure symbol "_Core" used to access certain
      special bindings (e.g Match and Bind exceptions)
      defs: CoreSym
    primopid.sig/sml
      defines front-end representation of primops, where a primop is identified
      with a string name
      defs: PRIMOPID, PrimopId

  ElabData/syntax/
  (typed) abstract syntax
    absyn.sig/sml
      the abstract syntax types
      defs: ABSYN, Absyn: ABSYN
    varcon.sig/sml
      variable and data constructor representations
      defs: VARCON, VarCon: VARCON
    absynutil.sml
      utility functions for building tuple patterns and expressions
      defs: AbsynUtil

  ElabData/types/
  representing, constructing and manipulating types
    types.sig/sml
      the representation of SML types
      defs: TYPES, Types: TYPES
    typesutil.sig/sml
      large collection of utility functions for working with types
      defs: TYPESUTIL, TypesUtil: TYPESUTIL
    tuples.sml
      fns for constructing tuple and record types
      defs: TUPLES, Tuples: TUPLES
    core-basictypes.sml
      building the primitive types and associated values (containing only
      implementation independent, language-standard basic types?)
      see: Elaborator/types/basictypes.sml
      defs: CoreBasicTypes

  ElabData/statenv/
  static environments
    bindings.sig/sml
      the basic binding forms (values, types, signatures, etc.)
      defs: BINDINGS, Bindings: BINDINGS
    statenv.sig/sml
      instantiate generic environments with ML bindings
      defs: STATICENV, StaticEnv: STATICENV
    lookup.sig/sml
      accessing symbols in environments
      defs: LOOKUP, Lookup : LOOKUP
    genmap.sml
      rapid modmap generation based on modtrees
      defs: GenModIdMap
    coreacc.sml
      access components of the _Core structure
      defs: CoreAccess
    browse.sml
      "browsing" the static environment (not used???)
      defs: BrowseStatEnv

  ElabData/modules/
  representation of modules
    modules.sig/sml
      representation of modules and signatures
      defs: MODULES, Modules: MODULES
    moduleutil.sig/sml
      lots of utility functions for modules
      defs: MODULEUTIL, ModuleUtil: MODULEUTIL
    moduleid.sml
      module identities used in Modmaps ???
      defs: MODULE_ID, ModuleId: MODULE_ID
    entpath.sml
      access paths for navigating entities
      defs: ENT_PATH, EntPath:> ENT_PATH
    entityenv.sig/sml
      enity environments mapping entity variables
      defs: ENTITY_ENV, EntityEnv : ENTITY_ENV
    epcontext.sml
      hairy context info used during module elaboration,
      related to nesting of modules (ep stands for
      "entity path"?)
      defs: ENT_PATH_CONTEXT, EntPathContext :> ENT_PATH_CONTEXT

  ElabData/main/
    compinfo.sml
      elaboration context parameter
      defs: CompInfo
    edcontrol.sig/sml
      control flags for ElabData
      defs: ELABDATA_CONTROL, ElabDataControl : ELABDATA_CONTROL


Elaborator/
  The main elaborator code, plus some representation stuff in basics/,
  plus printing modules in print/.

  Elaborator/basics/
  some control flags, some representation types, some FLINT stuff
    elabcontrol.sml
      Elaborator control flags
      defs: ElabControl
    conrep.sml
      inferring conreps for data constructors
      defs: CONREP, ConRep: CONREP
    debindex.sig/sml [FLINT]
      FLINT book-keeping (move back to FLINT)
      defs: DEB_INDEX, DebIndex : DEB_INDEX
    ptnum.sml
      prim type numbers, augmenting ElabData/basics/core-ptnum.sml with
      implementation dependent types
      see: ElabData/basics/core-ptnum.sml
      defs: PRIM_TYC_NUM, PrimTycNum: PRIM_TYC_NUM

  Elaborator/print/  [should be in ElabData?]
  print utilities and print modules for elaboration data structures
    pputil.sig/sml
      prettyprint utilities (generic)  [**MOVE**]
    pptype.sml
      prettyprint types
    ppval.sml
      prettyprint variables and dcons
    ppmod.sml
      prettyprint modules and signatures
    ppabsyn.sml
      prettyprint absyn (uses PPUtil(pputil.s??),
      PPVal(ppval.sml), PPType(pptype.sml))

  Elaborator/types/
  building basic types + typechecking modules
    basictypes.sig/sml
      define basic (built-in) types; most are just defined in terms of
      types from CoreBasicTypes [MOVE to ElabData?]
      see: ElabData/types/core-basictypes.sml
      defs: BasicTypes
    eqtypes.sml 
      equivalence of types
      defs: EQTYPES, EqTypes: EQTYPES
    unify.sml 
      type unification
      defs: UNIFY, Unify: UNIFY
    overloadlit.sml
      overloaded numeric literals
      defs: OVERLOADLIT, OverloadLit: OVERLOADLIT
    overload.sml
      overloading resolution
      defs: OVERLOAD, Overload
    typecheck.sml [FLINT]
      defines typechecking _functor_ TypecheckFn, taking some FLINT-related
      inlining info as parameters [should make into a structure]
      defs: TYPECHECK, TypecheckFn: _ => TYPECHECK

  Elaborator/modules/
  support modules for elaborating modules
    evalent.sml
      evaluate "entities" (module and type realizations). Defines EvalEntityFn
      which is called to define EvalEntity structure in Semant/modules/evalent.sml
      see: Semant/modules/evalent.sml
      defs: EVALENTITY, EvalEntityFn : INSTANTIATE => EVALENTITY
    expandtycon.sml
      interpret PATHtycs in entity environments
      defs: EXPAND_TYCON, ExpandTycon : EXPAND_TYCON
    instantiate.sml
      free instantiation of signatures. defines InstantiateFn which is applied
      to define structure Instantiate in Semant/modules/instantiate.sml
      see: Semant/modules/instantiate.sml
      defs: INSTANTIATE_PARAM, INSTANTIATE,
            InstantiateFn: INSTANTIATE_PARAM => INSTANTIATE
    sigmatch.sml
      signature matching. defines SigMatchFn, which is applied to define
      SigMatch structure in Semant/modules/sigmatch.sml
      see: Semant/modules/sigmatch.sml
      defs: SIGMATCH, SigMatchFn: EVALENTITY => SIGMATCH

  Elaborator/elaborate/
  main elaboration modules, plus some supporting modules
    tyvarset.sml
      type var sets for keeping track of implicit scopes of user type vars
      defs: TYVARSET, TyvarSet :> TYVARSET
    specialsyms.sml
      definition of special symbols for internal use
      defs: SpecialSymbols
    elabutil.sig/sml
      general utilities for elaboration
      defs: ELABUTIL, ElabUtil : ELABUTIL
    elabdebug.sml
      debugging facilities for elaboration
      defs: ELABDEBUG, ElabDebug : ELABDEBUG
    precedence.sml
      precedence parser for core expressions, dealing with infix operators
      defs: PRECEDENCE, Precedence : PRECEDENCE
    elabtype.sig/sml
      elaboration of type expressions and declarations
      defs: ELABTYPE, ElabType : ELABTYPE
    elabcore.sml
      elaborating core ML (expressions, declarations)
      defs: ELABCORE, ElabCore: ELABCORE
    elabmod.sml
      main module elaboration. defines ElabModFn, which is called to
      define ElabMod structure in Semant/elaborate/elabmod.sml
      see: Semant/elaborate/elabmod.sml
      defs: ELABMOD, ElabModFn: SIGMATCH # TYPECHECK => ELABMOD
    include.sml
      elaborate include specs in signatures (supports elabsig)
      defs: INCLUDE, Include: INCLUDE
    elabsig.sml
      elaborate signatures
      defs: ELABSIG, ElabSig : ELABSIG
    elabtop.sml
      top-level elaboration driver. defines ElabTopFn, which is called
      to define ElabTop structure in Semant/elaborate/elabtop.sml
      see: Semant/elaborate/elabtop.sml
      defs: ELABTOP, ElabTopFn : ELABMOD => ELABTOP


3. Miscellaneous utilities

MiscUtil/
  Contains various kinds of utility programs

  bignums/
  supporting real constants (using bignums?)
    ieeereal.sml
      Support for IEEE floating-point constants. calls RealConst functor
      see: MiscUtil/bignums/realconst.sml
      defs: IEEERealConst
    realconst.sml
      generate ML real (i.e. ieee floating point?) constants
      defs: PRIMREAL, REALCONST, RealConst: PRIMREAL => REALCONST

  library/
  Utility modules that are candidates for eventual
  promotion to general libraries (crc and pickling)
    crc.sml
      crc codes
      defs: CRC, CRC :> CRC
    pickle-lib.cm
      CM description for basic pickling/unpickling library
    pickle-util.sml
      supporting pickling
      defs: PICKLE_UTIL, PickleUtil :> PICKLE_UTIL
    unpickle-util.sml
      supporting unpickling
      defs: UNPICKLE_UTIL, UnpickleUtil :> UNPICKLE_UTIL

  print/
  Pretty printing for absyn declarations, values
    ppdec.sml
      printing results of top-level declarations, including values and types
      defs: PPDEC, PPDec : PPDEC
    ppobj.sml
      print top-level values
      defs: PPOBJ, PPObj : PPOBJ
    pptable.sml
      register for user-defined prettyprinters for datatypes
      defs: PPTABLE, PPTable : PPTABLE

  util/
  A couple of miscellaneous leftovers.
    feedback.sml
      Compute minimum feedback vertex set of a given directed graph.
      should be part of a graph library (move to ../library?)
      defs: Feedback
    literal-to-num.sml
      Conversions from integer/word literals (which are represented as
      arbitrary precision ints) to fixed size. a hack that should be
      replaced by a parameterized numeric types.
      size numbers
      defs: LITERAL_TO_NUM, LiteralToNum : LITERAL_TO_NUM


3. Middle End
-------------

FLINT/
intermediate representation (a form of typed lambda calculus)

  [see FLINT/MAP]


4. Back End
-----------

MLRISC/
MLRISC based code generators


5. Execution Model
-----------------

Execution/

  dynenv/
    dynenv.sig,sml
      dynamic environments, and instance of PidEnvFn
      see: Basics/mlcomp/pidenv.sml
      defs: DYNAMICENV, DynamicEnv : DYNAMICENV
  codeobj/
    code-obj.sig,sml
      an interface for manipulating code objects
      defs: CODE_OBJ, CodeObj :> CODE_OBJ
  binfile/
    binfile.sig,sml
      file format for bin files (machine-independent)
      defs: BINFILE, Binfile :> BINFILE
  main/
    importtree.sml
      defs: ImportTree
    isolate.sml
      isolate the continuation context to the top-level (a prompt?)
      defs: Isolate
    execute.sml
      execution of top-level executables in a dynamic environment
      defs: Execute


6. Interactive Top Level
------------------------

TopLevel/

  environ/
  combined static and dynamic environments
    environ.sig,sml
      defs: ENVIRONMENT, Environment: ENVIRONMENT
    symenv.sig,sml
      defines SYMENV as a specialization of PIDENV, and SymbolicEnv as
      an instance of PidEnvFn.
      see: Basics/mlcomp/pidenv.sig, Basics/mlcomp/pidenv.sml
      defs: SYMENV, SymbolicEnv: SYMENV

  backend/
    backend.sig
      defs: BACKEND
    backend-fn.sml
      defs: BackendFn : CODEGENERATOR # {val cproto_conv : string} => BACKEND
    alpha32.sml
      defs: Alpha32Backend
    hppa.sml
      defs: HppaBackend
    ppc.sml
      defs: PPCBackend
    sparc.sml
      defs: SparcBackend
    x86-ccall.sml
      defs: X86CCallBackend
    x86-stdcall.sml
      defs: X86StdCallBackend

  interact/
    envref.sml
      supports top-level environment management
      defs: ENVREF, EnvRef : ENVREF
    evalloop.sig,sml
      top-level read-eval-print loop
      defs: EVALLOOP, EvalLoopF: TOP_COMPILE => EVALLOOP
    interact.sig,sml
      creating top-level loops
      defs: INTERACT, Interact: EVALLOOP => INTERACT

  main/
    control.sig
      defs: MCCONTROL, FLINTCONTROL, CGCONTROL, CONTROL
    control.sml
      defs: Control_MC, Control_CG, Control
    version.sml
      records the compiler version and version date
      defs: CompilerVersion
    printhooks.sml
      defs: PrintHooks
    pptable.sml
      defs: CompilerPPTable
    code-generator.sig
      defs: CODEGENERATOR
    compile.sig
      defs: COMPILE0, COMPILE, TOP_COMPILE
    compile.sml
      defs: CompileF: CODEGENERATOR # CCONFIG # {cproto_conv : string} => COMPILE0



============================================================================

Catalog of basic structures (Front End)
---------------------------------------

symbols
  Symbol         (Basics/mlcomp/symbol.sig,sml)
  FastSymbol     (Basics/mlcomp/fastsymbol.sig,sml)

symbolic paths
  SymPath        (ElabData/basics/sympaths.sml)
  InvPath        (ElabData/basics/sympaths.sml)
  ConvertPaths   (ElabData/basics/sympaths.sml)

ast (syntax trees)
  Ast            (Parse/ast/ast.sig,sml)
  AstUtil        (Parse/ast/astutil.sig,sml)

absyn (abstract syntax)
  Absyn          (ElabData/syntax/absyn.sig,sml)
    abstract syntax datatypes for expressions, declarations, etc.
  VarCon         (ElabData/syntax/varcon.sig,sml)
    variables and constructors
  AbsynUtil      (ElabData/syntax/absynutil.sml)
    utility module for working with absyn
  PPAbsyn        (Elaborator/print/ppabsyn.sml)
    prettyprinting absyn

types (internal representation of types)
 representations
  Types          (ElabData/types/types.sig,sml)
  ConRep         (Elaborator/basics/conrep.sml)

 utilities, manipulating and comparing types
  TypesUtil      (ElabData/types/typesutil.sig,sml)
  Tuples         (ElabData/types/tuples.sml)
  EqTypes        (Elaborator/types/eqtypes.sml)
  Unify          (Elaborator/types/unify.sml)

 primitive types
  CorePrimTycNum (ElabData/basics/core-ptnum.sml)
  PrimTycNum     (Elaborator/basics/ptnum.sml)
  CoreBasicTypes (ElabData/types/core-basictypes.sml)
  BasicTypes     (Elaborator/types/basictypes.sig,sml)
  PrimEnv        (Semant/statenv/prim.sml)

 printing types
  PPType         (Elaborator/print/pptype.sml)

dynamic access info
  LambdaVar      (ElabData/basics/lambdavar.sig,sml)
    lambda variables (dynamic access roots for variables)
  Access         (ElabData/basics/access.sml)
    dynamic access modes

environment  (generic environment: 'b env)
  Env            (ElabData/basics/env.sml)

static environment
  Bindings       (ElabData/statenv/bindings.sig,sml)
  StaticEnv      (ElabData/statenv/statenv.sml)
  Lookup         (ElabData/statenv/lookup.sml)
  BrowseStatEnv  (ElabData/statenv/browse.sml)

modules (signatures, structures, functors)
  Modules          (ElabData/modules/modules.sig,sml)
  ModuleUtil       (ElabData/modules/moduleutil.sig,sml)
  ModuleId         (ElabData/modules/moduleid.sml)
  EntPath          (ElabData/modules/entpath.sml)
  EntityEnv        (ElabData/modules/entityenv.sml)
  ModulePropLists  (Semant/modules/module-plists.sml) [FLINT]

primop
  PrimOp           (FLINT/kernel/primop.sml)
  PrimOpMap	   (FLINT/trans/primopmap.sml)
  PrimOpId	   (ElabData/basics/primopid.sml)
  PrimOpTypeMap	   (Semant/statenv/primoptypemap.sml)
  PrimEnv          (Semant/statenv/prim.sml)

control
  BasicControl     (Basics/main/basiccontrol.sml)
  ParserControl    (Parse/main/parsercontrol.sml)
  ElabDataControl  (ElabData/main/edcontrol.sml)
  ElabControl      (Elaborator/basics/elabcontrol.sml)
  Control_Print    (Basics/print/printcontrol.sml)

  Control          (TopLevel/main/control.sml)
  Control_CG       (TopLevel/main/control.sml)
  Control_MC       (TopLevel/main/control.sml)


==========================================================================

Notes
=====

1. CoreBasicTypes/BasicTypes and CorePrimTycNum/PrimTycNum splits are
part of an attempt to have a subset of the front end modules that
can be used as a generic, implementation dependent SML front-end.  That
is, CoreBasicTypes defines only those types that must be provided in
any SML implementation.  BasicTypes adds those types that are specific
to SML/NJ.


2. What is the distinction between Basics and Semant?  Should these be
merged?  How about ElabData?  Some of these files (Semant/types) might
also fit there.

We have Basics/*, Semant/basics, ElabData/basics, and Elaborator/basics.
What is the rationale telling us what goes in each of these places?

This complex organization seems to be partially motivated by the goal
of separating out any features that are SML/NJ-specific from the generic
SML stuff.
