[mercury-users] Simple program

Tomas By tomas at basun.net
Tue Sep 20 00:54:00 AEST 2011


Try to copy just "testlist.m" to an empty directory, and then compile it.

If that fails, it looks like a compiler bug.

/Tomas



On Mon, September 19, 2011 16:41, Denis Kononenko wrote:
> 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
> --------------------------------------------------------------------------
>


--------------------------------------------------------------------------
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