[MLton-devel] mGTK for MLton status

Ken Friis Larsen ken@friislarsen.net
17 Aug 2003 11:00:44 +0100


Hi Stephen,

> Rather than trying to check the validity of the options in MLton as we
> do now or calling gcc and have it check, I think the best fix is to
> add a new switch, -link-opt, that is the analog of -cc-opt and passes
> the option when calling gcc as the linker.

This sounds like an excellent suggestion (*if you are interested in my
opinion ;-) *)

> BTW, Ken, I noticed that in mgtk-mlton.c you include mgtk-mlton.h,
> which appears to have been partially generated by hand.  The intended
> way to do this with mlton is to call
> 
> 	mlton -export-header true mgtk.cm >mgtk-mlton.h
> 
> to generate the header.

This is how I originally did it.

> I didn't know if you were unaware of this, or had encountered some
> problem.  If the latter, we'd like to hear about it.

No, I didn't encountered any problems.  I just got annoyed about the
warnings that gcc spew at me.  And instead of putting the appropiate
casts in mgtk-mlton.c I thought that it was cleaner to just edit
mgtk-mlton.h by hand and stop regenerating it ever time something
changed in mgtk.cm.  This was decided because we have arranged mGTK
such that only two functions need to be called from C, thus
mgtk-mlton.h only contains two prototypes, and these are unlikely to
change.


Cheers,

--Ken



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel