mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 04:43:53 +00:00
27 lines
503 B
Groff
27 lines
503 B
Groff
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- module add_constructor_r.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- import_module add_constructor_r_2.
|
|
|
|
:- type t
|
|
---> c(int).
|
|
|
|
main(!IO) :-
|
|
output(c(1), !IO).
|
|
|
|
:- pred output(t::in, io::di, io::uo) is det.
|
|
|
|
output(X, !IO) :-
|
|
io.write_line(X, !IO).
|