RosettaCodeData/Task/Program-name/Mercury/program-name.mercury
2023-07-01 13:44:08 -04:00

16 lines
441 B
Text

:- module program_name.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
% The first argument is used as the program name if it is not otherwise
% available. (We could also have used the predicate io.progname_base/4
% if we did not want path preceding the program name.)
io.progname("", ProgName, !IO),
io.print_line(ProgName, !IO).
:- end_module program_name.