[mercury-users] Simple program
Denis Kononenko
deniskononenko at gmail.com
Tue Sep 20 00:41:07 AEST 2011
Yes!
----------------------------------------------------------------------------------
MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$ cat testlist.m
:- module testlist.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
:- import_module list.
main(!IO) :- L=[1,2,3], io.write_list(L, "\n", io.write_int, !IO).
MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$ wc -l testlist.m
11 testlist.m
MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$ mmc --make testlist
Making Mercury/os/testlist.o
testlist.m:26: error: initializer element is not constant
testlist.m:26: error: (near initialization for ‘testlist_scalar_common_1[0][1]’)
** Error making `Mercury/os/testlist.o'.
MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$
----------------------------------------------------------------------------------
19.09.2011, в 20:08, Tomas By написал(а):
> Your code has ten lines and the compiler reports an error at line 26?
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list