(* Copyright YALE FLINT PROJECT 1997 *)
(* Copyright Bell Labs, Lucent Technologies 1999 *)
(* intsys.cm *)

(*
 * Revised for using the new CM. (M.Blume, 7/1999)
 *)

(primitive)
Library
	(* bootstrap stuff *)
	structure InteractiveSystem

	(* export representatives for pro-forma libraries... *)
	structure Compiler  (* $smlnj/compiler/compiler.cm *)
	structure CM        (* $smlnj/cm.cm *)
	structure CMB       (* $smlnj/cmb.cm *)
	structure Tools
	structure NowebTool
	structure MakeTool
	structure ShellTool
	structure DirTool
	structure GenericInstall (* $smlnj/installer.cm *)
	structure LibraryInstall (* $smlnj/library-install.cm *)

# if not defined(LIGHT)
	(* export one representative from $smlnj/compiler/all.cm *)
	structure Alpha32UnixCMB
# endif 
is
	$smlnj/init/init.cmi : cm

	$smlnj/basis/basis.cm
	$smlnj/viscomp/basics.cm
	$smlnj/viscomp/core.cm

	(* need access to CM's "init" function *)
	$smlnj/internal/cm0.cm

	(* Need access to the actual backend... *)
	$smlnj/compiler.cm

	(* these are just here so they get made... *)
	$smlnj/compiler/compiler.cm
	$smlnj/compiler/minimal-only.cm
	$smlnj/cm.cm
	$smlnj/cmb.cm

	$smlnj/cm/tools.cm
        (* Technically, the noweb tool is not needed here.  It should
         * eventually be moved into the noweb source tree and installed
         * from there. *)
	$/nw-ext.cm		(* implies $/noweb-tool.cm *)
	(* Register the make tool here. (Kinda unrealistic to hope that
	 * Unix' make suddenly comes with a CM plugin... *)
	$/make-tool.cm
	(* Same for shell tool... *)
	$/shell-tool.cm

	(* Register the "dir" tool.  Its classifier (but not the tool
	 * itself) is always "plugged-in". *)
	$/dir-tool.cm

	(* The next are installers.  They just needs to get compiled
	 * so we know they are in sync with the rest of the code... *)
	$smlnj/installer.cm
	$smlnj/library-install.cm

	(* We add the HTML lib.  It gets compiled anyway (even though
	 * the compiler does not need it) because of a static dependence
	 * from a module in pp-lib.cm.  Since the code gets compiled,
	 * we should arrange for it to show up in a sensible location.
	 * That's why we mention it here. *)
	$smlnj/smlnj-lib/html-lib.cm

# if not defined(LIGHT)
	$smlnj/compiler/all.cm
# endif

	(* build boot environments *)
	boot-env-fn.sml
	boot-env.sml

	(* glue code (build the interactive system) *)
	int-sys.sml

	(* need access to the Controls module (for registering
	 * MLRISC controls: *)
	$smlnj/smlnj-lib/controls-lib.cm
