Introducing the "lookup-constants runtime system" :)

Stephen Weeks MLton@sourcelight.com
Tue, 2 Oct 2001 11:12:50 -0700


> You want to support people using _prim to depend on new command line -D flags?

Yes.  I can imagine they might want there own analogues of MLton.safe or
MLton.debug that are settable on the command line.

> I guess I wouldn't bother.  If people want to do that kind of thing AND are
> cross-compiling, then they would have to add the values when compiling the
> code that has the constants in it.

This doesn't seem too objectionable to me -- as long as they can modify the
constants file by hand.  Mind you, this is just for cross-compiling.  I want the
same behavior we've always had for normal compiling -- automatically creat the C
code, run gcc, run the executable, and parse the output file.

> Rather than having fixed names (like safe) I would say just have some fixed
> prefix of the name: MLtonDef_ or something.  The symbols that start with that
> would not go into the constants file, on the assumption that they will be
> provided via -D flags.

I'm not quite sure what you mean by "fixed names".  All _prim constants are
treated exactly the same.  Anyways, given the above approach, I think we can
stick with _prim's as is in the basis library, and only make life tricky for
cross-compilers.