[MLton-devel] RE: calling SML from C in MLton

Stephen Weeks MLton@mlton.org
Wed, 30 Apr 2003 22:28:59 -0700

> You can do so by adding "-debug true -native false" to the FLAGS
> line in mllex/Makefile

I forgot that you also need "-keep g", which saves the generated C
files (mllex.*.c).  It's probably best just to run and find the line
where the error occurs.

If you want to find the program start point, you need to look at the
last line in mllex.0.c.  Mine looks like

	Main(8, 0x164778DF, 192, TRUE, TRUE, FALSE, 0, 987)

Then find the "case 987" (your number may be different) in one of the
mllex.*.c files.  Mine's on line 420 of mllex.4.c.  The next line is
where the SML code starts running.

This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
MLton-devel mailing list