[MLton] Windows ports and paths

Wesley W. Terpstra wesley@terpstra.ca
Wed, 4 May 2005 00:28:49 +0200


On Tue, May 03, 2005 at 06:18:25PM -0400, Matthew Fluet wrote:
> > By the way... This might also make good sense for all of those -target-*
> > opts. We discussed this before. I think -target-cc-opt sparc '...' is silly.
> 
> The -target-cc-opt stuff is for cross-compiling.

Ahh, right.
Though, mlton-script could read the -target option as easily as @MLton.

> I agree that some sort of predication/conditional is the next logical step
> for MLBs.  What is unclear is the right set of primitives for forming 
> conditionals.  You've mentioned two, but there are certainly others; it is 
> also a question of how conditions are resolved -- do they execute SML 
> code? do they execute system/shell code?

Please not shell code.

> > 3. Support including the name of a library to link against as an MLton
> >    extension to the MLB syntax. Suggest other implementations do similarly.
> > 
> >    - Coupled with #1 above, it becomes possible to conditionally include 
> >      a MLton specific .mlb file which pulls in the required libs.
> > 
> >    - I see no reason a user of mgtk.mlb needs to know what GTK+ libraries
> >      mgtk is using; mgtk should be able to specify this itself and hide it.
> 
> I agree that some mechanism along these likes is desirable, though that 
> has been debated on this list.  Many of the same questions as above arise.  
> For example, GTK+ seems to like to use pkg-config to resolve compile/link 
> flags.  But, that would require executing a shell call during the 
> evaluation of a MLB.  It does appear that one soon ends up importing much 
> of shell functionality into MLBs, where it doesn't realy belong.

I don't think you need shell features...

mgtk will still have a Makefile or something because it interacts with C.
The Makefile for mgtk could quite easily dump the output of pkg-config into
the MLB file during compile. There's no need for the shell invocation to
leak into the MLB itself.

BTW, what happened to the idea of building custom world files from MLBs?

-- 
Wesley W. Terpstra