[mercury-users] Simple program
Tomas By
tomas at basun.net
Tue Sep 20 00:08:25 AEST 2011
Hi,
Your code has ten lines and the compiler reports an error at line 26?
It compiles and runs ok for me.
/Tomas
On Mon, September 19, 2011 15:53, Denis Kononenko wrote:
> Hello!
> Please help me
>
> ------------------------------------------------
> :- module learn2.
> :- interface.
> :- import_module io.
>
> :- pred main(io::di, io::uo) is det.
>
> :- implementation.
> :- import_module list.
>
> main(!IO) :- io.write_list([1], "\n", io.write_int, !IO).
> ------------------------------------------------
> bash-3.2$ mmc --make learn2
> Making Mercury/int3s/learn2.int3
> Making Mercury/ints/learn2.int
> Making Mercury/cs/learn2.c
> Making Mercury/os/learn2.o
> learn2.m:26: error: initializer element is not constant
> learn2.m:26: error: (near initialization for
> learn2_scalar_common_1[0][1])
> ** Error making `Mercury/os/learn2.o'.
>
> Why I have error?
> --------------------------------------------------------------------------
> 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
> --------------------------------------------------------------------------
>
--------------------------------------------------------------------------
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