Search code examples
sleepsmltracesmlnjabort

exit, abort, sleep for debugging?


In Prolog you can activate trace mode for debugging. Apparently there is no such thing in ML. Is there at least a exit() or abort()? A sleep() would also be useful to approximate trace mode from Prolog, when combined with debug print statements.


Solution

  • To force an exit, you can use the OS.Process structure:

     OS.Process.exit OS.Process.success;
    

    Also note that Poly/ML does have a good debugger.