[m-dev.] logging proposal
Michael Day
mikeday at yeslogic.com
Mon Feb 27 21:40:09 AEDT 2006
> We add a special procedure `log' to the builtin module. The new
> procedure takes a string as input (or possibly an I/O closure). The
> compiler is then modified to treat calls to log as being the same as
> true, unless an "--enable-logging" options is given. If this option is
> given then the logging predicates write their output somewhere (where
> they write their output could be given by another mmc option).
If log was defined like this:
:- pred log(string :: in) is det.
then could it potentially be reordered within this predicate:
log("about to do something"),
do_something(!IO),
log("about to do something else"),
do_something_else(!IO)
as it seems that logically, the two calls to log are independent and could
be reordered (or of course removed entirely, as they have no output).
Michael
--
Print XML with Prince!
http://www.princexml.com
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list