<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">:(<div><br></div><div><div>MacBook-Pro-Denis-Kononenko:ml deniskononenko$ mmc --make testlist.clean</div><div>Cleaning up target files for module `test list'.</div><div><br></div><div>MacBook-Pro-Denis-Kononenko:ml deniskononenko$ rm -rf Mercury/*</div><div><br></div><div>MacBook-Pro-Denis-Kononenko:ml deniskononenko$ mmc --make -s asm_fast.gc testlist</div><div>mercury_compile: error: the Mercury standard library cannot be found in grade asm_fast.gc.</div><div><br></div><div>MacBook-Pro-Denis-Kononenko:ml deniskononenko$ mmc --make -s hlc.gc testlist</div><div>Making Mercury/int3s/testlist.int3</div><div>Making Mercury/ints/testlist.int</div><div>Making Mercury/cs/testlist.c</div><div>Making Mercury/os/testlist.o</div><div>testlist.m:26: error: initializer element is not constant</div><div>testlist.m:26: error: (near initialization for ‘testlist_scalar_common_1[0][1]’)</div><div>** Error making `Mercury/os/testlist.o'.</div><div><div>19.09.2011, â 21:22, Vladimir Gubarkov íàïèñàë(à):</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi</div><div><br></div>I faced similar problem.<div><br></div><div>What you could try to solve it.</div><div><br></div><div>0) Try mmc --make progname.clean (note .clean ending)</div><div>1) Clean manually <span style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">Mercury directory (remove all directories from it), recompile</span></div>
<div><font face="arial, sans-serif">2) Try compiling to different grade, (-s option), like</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">mmc --make -s asm_fast.gc progname</font></div>
<div><font face="arial, sans-serif">or</font></div><div><font face="arial, sans-serif">mmc --make -s hlc.gc progname</font></div><div><font face="arial, sans-serif"><br></font><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 6:54 PM, Tomas By <span dir="ltr"><<a href="mailto:tomas@basun.net">tomas@basun.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Try to copy just "testlist.m" to an empty directory, and then compile it.<br>
<br>
If that fails, it looks like a compiler bug.<br>
<font color="#888888"><br>
/Tomas<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
On Mon, September 19, 2011 16:41, Denis Kononenko wrote:<br>
> Yes!<br>
> ----------------------------------------------------------------------------------<br>
> MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$ cat testlist.m<br>
> :- module testlist.<br>
> :- interface.<br>
> :- import_module io.<br>
><br>
> :- pred main(io::di, io::uo) is det.<br>
><br>
> :- implementation.<br>
> :- import_module list.<br>
><br>
> main(!IO) :- L=[1,2,3], io.write_list(L, "\n", io.write_int, !IO).<br>
><br>
> MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$ wc -l testlist.m<br>
> 11 testlist.m<br>
> MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$ mmc --make<br>
> testlist<br>
> Making Mercury/os/testlist.o<br>
> testlist.m:26: error: initializer element is not constant<br>
> testlist.m:26: error: (near initialization for<br>
> ‘testlist_scalar_common_1[0][1]’)<br>
> ** Error making `Mercury/os/testlist.o'.<br>
> MacBook-Pro-Denis-Kononenko:mercury_learn deniskononenko$<br>
> ----------------------------------------------------------------------------------<br>
><br>
> 19.09.2011, â 20:08, Tomas By íàïèñàë(à):<br>
><br>
>> Your code has ten lines and the compiler reports an error at line 26?<br>
><br>
><br>
> --------------------------------------------------------------------------<br>
> mercury-users mailing list<br>
> Post messages to: <a href="mailto:mercury-users@csse.unimelb.edu.au">mercury-users@csse.unimelb.edu.au</a><br>
> Administrative Queries: <a href="mailto:owner-mercury-users@csse.unimelb.edu.au">owner-mercury-users@csse.unimelb.edu.au</a><br>
> Subscriptions: <a href="mailto:mercury-users-request@csse.unimelb.edu.au">mercury-users-request@csse.unimelb.edu.au</a><br>
> --------------------------------------------------------------------------<br>
><br>
<br>
<br>
--------------------------------------------------------------------------<br>
mercury-users mailing list<br>
Post messages to: <a href="mailto:mercury-users@csse.unimelb.edu.au">mercury-users@csse.unimelb.edu.au</a><br>
Administrative Queries: <a href="mailto:owner-mercury-users@csse.unimelb.edu.au">owner-mercury-users@csse.unimelb.edu.au</a><br>
Subscriptions: <a href="mailto:mercury-users-request@csse.unimelb.edu.au">mercury-users-request@csse.unimelb.edu.au</a><br>
--------------------------------------------------------------------------<br>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></body></html>