Just having switched from sml-nj to polyml we would need the Poly/ML equivalents of
SMLofNJ.exportML"myBinary"; sml @SMLload=myBinary
Anyone with a quick help ? We find http://www.polyml.org/docs/poly/intro.html very helpful (but we couldn't find the answer to our question ??), and we are not yet familiar enough with the basis library.
Thanks, Walther
On Saturday 23 Aug 2003 8:43 am, Walther Neuper wrote:
Just having switched from sml-nj to polyml we would need the Poly/ML equivalents of
SMLofNJ.exportML"myBinary";
As far as I am aware, there is no exact equivalent. Poly/ML has the idea of a ML persistent object store organised as a hierarchy of databases (with the compiler itself in the root of the hierarchy, which is typically either the file ML_dbase supplied as part of Poly/ML or a copy of it). The closest to the above SML/NJ command is to omething like this:
1) In a shell run:
cp /usr/lib/poly/ML_dbase myBinary
(assuming you're on Linux or similar, or use equivalent DOS commands on Windows).
2) Run poly on the copy of ML_dbase
poly myBinary
(which is the poly equivalent of:
sml @SMLload=myBinary )
3) Now use PolyML.use to compile the code you want to be saved in myBinary and execute:
PolyML.commit();
to bring the database up-to-date.
Alternatively, use PolyML.make_database to make a new empty database which picks up the compiler from an ancestor database: See "Using Poly/ML"
http://www.polyml.org/docs/UsingIndex.html
particularly chapters 1 and 8. But note that some parts of this document may be a little out-of-date (e.g., there is no separate discgarb programme now, you use poly -d instead).
couldn't find the answer to our question ??), and we are not yet familiar enough with the basis library.
I don't believe that facilties for loading and saving compiled code from and to object files are covered by the basis library - this is a topic that is not standardised.
Hope that helps.
Regards,
Rob.