[mercury-users] Simple program
Denis Kononenko
deniskononenko at gmail.com
Tue Sep 20 01:42:49 AEST 2011
:(
MacBook-Pro-Denis-Kononenko:ml deniskononenko$ mmc --make testlist.clean
Cleaning up target files for module `test list'.
MacBook-Pro-Denis-Kononenko:ml deniskononenko$ rm -rf Mercury/*
MacBook-Pro-Denis-Kononenko:ml deniskononenko$ mmc --make -s asm_fast.gc testlist
mercury_compile: error: the Mercury standard library cannot be found in grade asm_fast.gc.
MacBook-Pro-Denis-Kononenko:ml deniskononenko$ mmc --make -s hlc.gc testlist
Making Mercury/int3s/testlist.int3
Making Mercury/ints/testlist.int
Making Mercury/cs/testlist.c
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'.
19.09.2011, в 21:22, Vladimir Gubarkov написал(а):
> Hi
>
> I faced similar problem.
>
> What you could try to solve it.
>
> 0) Try mmc --make progname.clean (note .clean ending)
> 1) Clean manually Mercury directory (remove all directories from it), recompile
> 2) Try compiling to different grade, (-s option), like
>
> mmc --make -s asm_fast.gc progname
> or
> mmc --make -s hlc.gc progname
>
>
> On Mon, Sep 19, 2011 at 6:54 PM, Tomas By <tomas at basun.net> wrote:
> 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
> --------------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20110919/d0695edc/attachment.html>
More information about the users
mailing list