I need a working code for stack allocated closure

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

https://groups.google.com/forum/#!topic/ats-lang-users/wzPNLsScga4

I am getting lot of “undeclares” during compilation.

Thanks

Clean build also does not work.
It get stuck when it tries to build patscc and it has already built patsopt.

But it is ok , not a show stopper since I am not writing any serious code ,
I will use it in next release.On Mon, Mar 10, 2014 at 5:53 PM, Brandon Barker brandon...@gmail.comwrote:

You may need to do a clean build, described on the wiki building and
installing article.
On Mar 10, 2014 5:00 AM, “chotu s” chot...@gmail.com wrote:

Is this feature in released version 0.0.6(I have this installed) or it
is only in development version.

I cloned the github repo , but having difficulty in building it

Getting lots of “undefined reference to …” and “invalid symbol index”
crt1.o

On Mon, Mar 10, 2014 at 12:11 PM, gmhwxi gmh...@gmail.com wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this
function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once
for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use
in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
= 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%
40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.comhttps://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME} -I${PATSHOME}/ccomp/runtime
-L${PATSHOME}/ccomp/atslib/lib -L${PATSHOME}/ccomp/atslib/lib64
-DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once for
each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use in
this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME} -I${PATSHOME}/ccomp/runtime
-L${PATSHOME}/ccomp/atslib/lib -L${PATSHOME}/ccomp/atslib/lib64
-DATS_MEMALLOC_LIBC -o c1 c1_dats.c) = 256On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.

You may need to do a clean build, described on the wiki building and
installing article.On Mar 10, 2014 5:00 AM, “chotu s” chot...@gmail.com wrote:

Is this feature in released version 0.0.6(I have this installed) or it is
only in development version.

I cloned the github repo , but having difficulty in building it

Getting lots of “undefined reference to …” and “invalid symbol index”
crt1.o

On Mon, Mar 10, 2014 at 12:11 PM, gmhwxi gmh...@gmail.com wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once
for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use
in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
= 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%
40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.comhttps://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

Is this feature in released version 0.0.6(I have this installed) or it is
only in development version.

I cloned the github repo , but having difficulty in building it

Getting lots of “undefined reference to …” and “invalid symbol index”
crt1.oOn Mon, Mar 10, 2014 at 12:11 PM, gmhwxi gmh...@gmail.com wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once
for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use
in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c) =
256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%
40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.com?utm_medium=email&utm_source=footer
.

It is straightforward to build the up-to-date version:

git clone git://git.code.sf.net/p/ats2-lang/code ATS2
cd ATS2
./configure
make all
sudo make install // only if you need itOn Monday, March 10, 2014 8:58:00 AM UTC-4, chotu s wrote:

Clean build also does not work.
It get stuck when it tries to build patscc and it has already built
patsopt.

But it is ok , not a show stopper since I am not writing any serious code
, I will use it in next release.

On Mon, Mar 10, 2014 at 5:53 PM, Brandon Barker <brand...@gmail.com<javascript:> wrote:

You may need to do a clean build, described on the wiki building and
installing article.
On Mar 10, 2014 5:00 AM, “chotu s” <cho...@gmail.com <javascript:>> wrote:

Is this feature in released version 0.0.6(I have this installed) or
it is only in development version.

I cloned the github repo , but having difficulty in building it

Getting lots of “undefined reference to …” and “invalid symbol index”
crt1.o

On Mon, Mar 10, 2014 at 12:11 PM, gmhwxi <gmh...@gmail.com <javascript:> wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this
function)
c1_dats.c:259:1: note: each undeclared identifier is reported only
once for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first
use in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1
c1_dats.c) = 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/
EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for
stack allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%
40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.comhttps://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once
for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use in
this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c) = 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi <gmh...@gmail.com <javascript:>>wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.

Yes, you need ATS1 to generate the C files in src/CBOOT.

For developing ATS2, I write code in ATS1. However, ATS1 and ATS2 are
syntactically similar. The template system in ATS1 is quite limited when
compared to that of ATS2.

We do have a plan to document the syntax trees of the C code generated from
ATS source.On Thursday, March 13, 2014 12:14:48 AM UTC-4, H Zhang wrote:

Is ATS2 compiler (files in src/CBOOT) still dependent on ATS/Anairiats? If
one wants to change any of the src/*.*ats file and rebuild one needs to
have ATS1 installed? It would be nice to make the main data structures and
main translation functions available to the C interface (with unscrambled
names). That way one can link with a dynamic language REPL and examine the
data structures on the fly.

Haitao

On Sunday, March 9, 2014 11:41:11 PM UTC-7, gmhwxi wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once
for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use
in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c) = 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.

Is ATS2 compiler (files in src/CBOOT) still dependent on ATS/Anairiats? If
one wants to change any of the src/*.*ats file and rebuild one needs to
have ATS1 installed? It would be nice to make the main data structures and
main translation functions available to the C interface (with unscrambled
names). That way one can link with a dynamic language REPL and examine the
data structures on the fly.

HaitaoOn Sunday, March 9, 2014 11:41:11 PM UTC-7, gmhwxi wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this function)
c1_dats.c:259:1: note: each undeclared identifier is reported only once
for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first use
in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1 c1_dats.c) = 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.

Thanks , I am now able to build it from sf repository and closure code also
works now :)On Mon, Mar 10, 2014 at 6:34 PM, gmhwxi gmh...@gmail.com wrote:

It is straightforward to build the up-to-date version:

git clone git://git.code.sf.net/p/ats2-lang/code ATS2
cd ATS2
./configure
make all
sudo make install // only if you need it

On Monday, March 10, 2014 8:58:00 AM UTC-4, chotu s wrote:

Clean build also does not work.
It get stuck when it tries to build patscc and it has already built
patsopt.

But it is ok , not a show stopper since I am not writing any serious code
, I will use it in next release.

On Mon, Mar 10, 2014 at 5:53 PM, Brandon Barker brand...@gmail.comwrote:

You may need to do a clean build, described on the wiki building and
installing article.
On Mar 10, 2014 5:00 AM, “chotu s” cho...@gmail.com wrote:

Is this feature in released version 0.0.6(I have this installed) or
it is only in development version.

I cloned the github repo , but having difficulty in building it

Getting lots of “undefined reference to …” and “invalid symbol index”
crt1.o

On Mon, Mar 10, 2014 at 12:11 PM, gmhwxi gmh...@gmail.com wrote:

Your version of ATS is probably not up-to-date. You can do a
git-pull and re-compile.

On Monday, March 10, 2014 2:24:14 AM UTC-4, chotu s wrote:

I am still unable to compile it properly .

Here is the code I am trying :

#include “share/atspre_define.hats”
#include “share/atspre_staload.hats”

implement main0 () = {

var f = lam@ () : void => {}

}

Assume that above is in c1.dats file .

I build like this :

patscc -DATS_MEMALLOC_LIBC -o c1 c1.dats

I get following output :

exec(patsopt --output c1_dats.c --dynamic c1.dats)
Hello from ATS2(ATS/Postiats)!
Loading [fixity.ats] starts!
Loading [fixity.ats] finishes!
Loading [basics_pre.sats] starts!
Loading [basics_pre.sats] finishes!
Loading [basics_sta.sats] starts!
Loading [basics_sta.sats] finishes!
Loading [basics_dyn.sats] starts!
Loading [basics_dyn.sats] finishes!
Loading [basics_gen.sats] starts!
Loading [basics_gen.sats] finishes!
Loading [stream.dats] starts!
Loading [stream.dats] finishes!
Loading [stream_vt.dats] starts!
Loading [stream_vt.dats] finishes!
The 1st translation (fixity) of [c1.dats] is successfully completed!
The 2nd translation (binding) of [c1.dats] is successfully completed!
The 3rd translation (type-checking) of [c1.dats] is successfully
completed!
The 4th translation (type/proof-erasing) of [c1.dats] is successfully
completed!
exec(patsopt --output c1_dats.c --dynamic c1.dats) = 0
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1
c1_dats.c)
c1_dats.c: In function ‘mainats_void_0’:
c1_dats.c:259:1: error: ‘tmpref1’ undeclared (first use in this
function)
c1_dats.c:259:1: note: each undeclared identifier is reported only
once for each function it appears in
c1_dats.c:281:1: error: ‘__patsfun_1$closurerize’ undeclared (first
use in this function)
exec(gcc -std=c99 -D_XOPEN_SOURCE -I${PATSHOME}
-I${PATSHOME}/ccomp/runtime -L${PATSHOME}/ccomp/atslib/lib
-L${PATSHOME}/ccomp/atslib/lib64 -DATS_MEMALLOC_LIBC -o c1
c1_dats.c) = 256

On Mon, Mar 10, 2014 at 11:02 AM, gmhwxi gmh...@gmail.com wrote:

Here is the working code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAM
PLE/ATS-QA-LIST/stkclo.dats

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAM
PLE/ATS-QA-LIST/Makefile

On Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for
stack allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.

To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-54
08-4961-8e92-7c4009d88a08%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/dcf0c85e-5408-4961-8e92-7c4009d88a08%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%
40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/40c4d084-bcb3-443e-977d-94de34cee6ae%40googlegroups.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%
2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.comhttps://groups.google.com/d/msgid/ats-lang-users/CAAZxu4wW2X%2BmuBcz%2Bf5DjxB%2BXcVUXzHkfnHzc_wBuBnhtqa2pQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/4e394f88-72ae-4232-9e89-30f8699608f7%40googlegroups.comhttps://groups.google.com/d/msgid/ats-lang-users/4e394f88-72ae-4232-9e89-30f8699608f7%40googlegroups.com?utm_medium=email&utm_source=footer
.

Here is the working code:

Here is the Makefile for compiling the code:

https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATS-QA-LIST/MakefileOn Monday, March 10, 2014 12:28:53 AM UTC-4, chotu s wrote:

Hello ,

If possible I would like to see a full working example code for stack
allocated closures , I am unable to compile example given here

Redirecting to Google Groups

I am getting lot of “undeclares” during compilation.

Thanks