That was quick! I only merged it about an hour ago. Basically the idea is that the loading of the library and extracting the symbol is deferred until the function is called. That allows functions to be defined in one session, saved with PolyML.export or PolyML.SaveState.saveState and then used in a subsequent session, even if the library is not actually available at the time of definition.
What seems to be happening here is that the exception that should be raised is getting handled at the wrong place. I need to look at it.
David
On 10/10/2015 08:56, Artella Coding wrote:
Hi, I was trying out the new foreign function interface that was committed today, and I find that if one tries to load a symbol that does not exist no error message is returned. For example in https://github.com/polyml/polyml/blob/598ff7841e5e155c1fff89bf75cd2a91ee7796... if I do
val sumTree2 = call1 ( getSymbol mylib "SumTreeDoesNotExist" ) cTree cInt;
then no error message is reported. Then upon the call to
sumTree aTree;
an error is encountered and the program just terminates.
Thanks
polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml