mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
This was a seperate repository in CVS and so it missed the conversion.
benchmarks/
As above.
24 lines
412 B
Mathematica
24 lines
412 B
Mathematica
:- module debug.
|
|
|
|
:- interface.
|
|
|
|
:- import_module string, list.
|
|
|
|
:- impure pred dump(string, list(string__poly_type)).
|
|
:- mode dump(in, in) is det.
|
|
|
|
:- implementation.
|
|
|
|
dump(Fmt, Args) :-
|
|
string__format(Fmt, Args, Str),
|
|
impure dump_str(Str).
|
|
|
|
:- impure pred dump_str(string::in) is det.
|
|
|
|
:- pragma foreign_proc("C",
|
|
dump_str(S::in),
|
|
[will_not_call_mercury, thread_safe],
|
|
"
|
|
fprintf(stderr, \"%s\", S);
|
|
").
|