Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/system/smlnj/internal/cm-hook.sml
ViewVC logotype

View of /sml/trunk/src/system/smlnj/internal/cm-hook.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 573 - (download) (annotate)
Thu Mar 9 15:23:52 2000 UTC (20 years, 5 months ago) by blume
File size: 1112 byte(s)
merging back changes from blume_devel_v110_26_2
 * Hook module for CM.
 *   This module exists to break the static dependency between CM and
 *   the compiler.  This way we avoid lengthy waits for the autoloader
 *   when touching CM at the interactive toplevel.
 *   (CM is there and running at bootstrap time, so it can easily
 *    install itself into the hook if this is what's desired.)
 *   Copyright (c) 1999 by Lucent Bell Laboratories
 * author: Matthias Blume (blume@cs.princeton.edu)
structure CmHook = struct
	(* some dummy routines to make up the initial contents of the hook *)
	fun b's_b (b: bool) (s: string) = false
	fun s_b (s: string) = false

	(* the hook itself *)
	val hook = ref { stabilize = b's_b,
			 recomp = s_b,
			 make = s_b,
			 autoload = s_b }
	(* the routine to be called at bootstrap time... *)
	fun init v = hook := v

	(* the CM structure that will be visible at top-level *)
	structure CM :> MINIMAL_CM = struct
	    fun autoload s = #autoload (!hook) s
	    fun make s = #make (!hook) s
	    fun recomp s = #recomp (!hook) s
	    fun stabilize b s = #stabilize (!hook) b s

ViewVC Help
Powered by ViewVC 1.0.0