Alex,
I don't know if you intended to send this to the list as well but I'm
copying it back there because I think it might be of general interest.
While I was playing around with the polyc script I wondered about adding
a --usestring option, similar to --use but with the actual ML in there
rather than the file name. Similar to the -e option to sed and awk
rather than the -f. It would then be possible to include the command to
load your saved state on the poly command line.
e.g. poly --usestring "PolyML.SaveState.loadState\"$SAVE\";" --use ...
Would that work?
David
On 05/04/2013 13:48, Alex Merry wrote:
On 05/04/13 13:24, David Matthews wrote:
I've added a "polyc" script that is generated from the build process.
The idea of this is to provide the similar sort of functionality that
users of C expect from the "cc" command. It's very simple at the moment
and is limited to a few options. It compiles an ML source file and
exports the "main" function. The -o option specifies where the
executable is to be placed, defaulting to a.out on Unix.
This sounds really useful.
One thing I would find useful is an option to load a saved state before
using a file; in Quantomatic, we save the build state, then have some
executables built on top of that (and also have a way of getting a
toplevel with that state).
Of course, we could just load the state from the file that contains the
main function, but that means either hard-coding the path to the saved
state in those files or having option-parsing boilerplate at the top of
each file to get the path of the saved state.
Currently, our build scripts have an -l/--load option (the two are
equivalent) to do this.
Alex
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml