[mercury-users] Way to exit immediately from a Mercury program?
Jonathan Morgan
jonmmorgan at gmail.com
Thu Apr 27 15:28:01 AEST 2006
On 4/26/06, Julien Fischer <juliensf at cs.mu.oz.au> wrote:
> That's what we do in the GLUT binding (see
> extras/graphics/mercury_glut/glut.m), defining exit similar to the
> following:
>
> :- pragma foreign_proc("C",
> exit(_IO0::di, _IO::uo),
> [will_not_call_mercury, promise_pure],
> "
> exit(mercury_runtime_terminate());
> ").
Is it necessary to terminate the runtime? What happens if you don't?
> It should be noted, among other things, that terminating a program this
> way will stuff up the deep profiler (and most probably isn't that great
> if you wish to use the debugger either).
Does this mean that these tools can't be used usefully used with
various GUI toolkits? (I don't think GLUT is the only one that is
likely to need such treatment).
Jon
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list