[m-rev.] for review: negation in trace goals conditions

Ondrej Bojar bojar at csse.unimelb.edu.au
Wed Feb 21 17:18:11 AEDT 2007


Julien Fischer wrote:
>> +    trace [runtime(env("TRACE_ABC") and not(env("TRACE_NOT_ABC"))),
> 
> This particular usage makes me wonder whether instead of supporting
> negation it might not be be better to extend the env runtime condition
> to check the value of the environment variable, e.g. something like:
> 
>     trace [
>         runtime(env_value("DEBUG", "yes"))
>     ]

Depends on your usage patterns. I leave that for future, leaving my own 
preferred future improvement aside, too:

   FooBar = foobar,
     % save debug info if DEBUG_SAVE_TO is defined
   trace [runtime(env("DEBUG_SAVE_TO", FileName)), io(!IO)]
     save_debug_info_to_file(FooBar, FileName, !IO),

O.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list