How exactly are you saving the state you want to load? The problem is
that you can only load a saved state into the same executable as you
used to save it. The ultimate reason for this restriction is that the
saved state does not save any heap cells that are present in the
executable but instead saves their (relative) addresses. loadState will
raise an exception if the saved state does not match the executable.
By "silently crash" do you mean that it raises an exception that you are
not handling or is this something else?
David
On 30/08/2017 13:10, michael.norr...@data61.csiro.au wrote:
If I have a program I’d like to compile with polyc that looks like
fun main () =
let
val _ = PolyML.SaveState.loadState (hd (CommandLine.arguments()))
in
…
end
what, if anything can I put in the … and have it work?
All I really want is what is effectively a sequence of calls to “use” in that
slot, but there seem to be many ways of generating executables that silently
crash.
Michael
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml