Hello, David. I saw your PolyML last commits on github. I'm impressed! You've considered all my remarks! Many thanks!
P.S. Foreign.Error.getLastError will be very useful for https://github.com/kni/sml-iconv :-) 2016-11-15 18:35 GMT+02:00 David Matthews <[email protected]>: > I'm still thinking about this. It would certainly be useful to get the > error result: errno in Unix and GetLastError and possibly also errno in > Windows. It don't see a way to specify this as a return type in the FFI > calls. > > The main problem is that there can be invisible calls into the run-time > system as a result of either heap exhaustion or stack overflow. As a first > step perhaps the error state should be saved explicitly across these so it > doesn't change under the feet of the application. > > David > > > On 13/11/2016 11:49, Florian Weimer wrote: >> >> * David Matthews: >> >>> The difficulty with getting errno in this way is that by the time you >>> get it it may have changed from the value it had. Any calls to the >>> run-time system may involve a system call that could affect it. >> >> >> Would it make sense to use a special return type which instructs >> PolyML to obtain the errno value at the time of return? This would >> address the synchronization issue. >> _______________________________________________ >> polyml mailing list >> [email protected] >> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml >> > _______________________________________________ > polyml mailing list > [email protected] > http://lists.inf.ed.ac.uk/mailman/listinfo/polyml _______________________________________________ polyml mailing list [email protected] http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
