Introducing the "lookup-constants runtime system" :)

Stephen Weeks MLton@sourcelight.com
Mon, 1 Oct 2001 18:10:42 -0700


> Yes, the _prim is a problem but I would guess that it basically never adds
> any constants.

No.  It does add constants.  For example,

      val safe = _prim "MLton_safe": bool;

is a compile-time constant defined by _prim.

BLECH.  Now I realize that even our current approach doesn't work because we
rely on some constants set on the command line, such as MLton_safe.

The only solution that I see is to distinguish between target-specific
constants, which are found via some include file on the target, and constants
like MLton_safe, which are defined (possibly very late, at compile time) on the
host.