[MLton] runtime optimization flags?

Matthew Fluet fluet at cs.cornell.edu
Tue Nov 28 05:44:56 PST 2006


>>> 1. GNU Make gives us 2 kinds of variables, and I think the MLton
>>> makefiles are using the sub-optimal kind:
>>> http://www.gnu.org/software/make/manual/html_node/Flavors.html
>> ...
>>> Patch 1 replaces all instances of plain old "=" with ":=", except in
>>> packages/freebsd/Makefile since I have no way of testing it.
> [...]
>> I've applied both patches to trunk.  Thanks for putting them together.
>
> I'm getting the following error compiling after the Makefile patch:
>
> Error: ../lib/mlton/basic/file-desc.sml 14.32.
>  Function applied to incorrect argument.
>    expects: _ * (_ -> [word])
>    but got: _ * (_ -> [Word64.word])
>    in: o (Word.layout, fdToWord)
>         parseAndElaborate raised in 2.83 + 1.01 (26% GC)

What platform?  I was able to self-compile on both x86-linux and 
x86-darwin without problems.

> I don't fully understand the effect of just switching from = to := in
> makefiles, but I'm guessing that variable assignments from child
> makefiles are now visible in parent makefiles.

I don't beleive that it affects the visibility of variable assignments. 
Just the time at which the RHS of a variable is reduced to a variable-free 
string.



More information about the MLton mailing list