Files
mercury/tests/hard_coded/pack_args_copy.m
2020-10-03 17:43:38 +10:00

30 lines
835 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module pack_args_copy.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
%---------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
:- implementation.
:- type enum ---> aa ; bb ; cc ; dd.
:- type enum(T) ---> aa ; bb ; cc ; dd.
:- type struct(T)
---> struct(enum(T), enum, T, enum(T), enum(T)).
%---------------------------------------------------------------------------%
main(!IO) :-
S0 = struct(aa, bb, "string", cc, dd),
copy(S0, S),
io.write_line(S0, !IO),
io.write_line(S, !IO).