Basically, one needs to copy the SATS files provided by CATS-parsemit to a
local directory, say,
.CATS-parsemit. In addition, one needs to copy the CATS files generated
from the ATS source (of CATS-parsemit).
This can be done by issuing:
make pkgreloc
These CATS files replace the need for library binaries (in the form of .a
or .so files), thus greatly enhancing portability.
Now just do ‘make all’, and ‘atscc2js’ should be built properly.
I see, it’s like encapsulation, but if whatever in a local section cannot
be used in another part, what’s the intended effect if not side effetcs? Or
is it about externs? But if so, then what about dynloads?Le jeudi 28 mai 2015 20:52:50 UTC+2, gmhwxi a écrit :
Well, the point is to make sure that whatever is included in the local
sections cannot
be used in other parts of the code. However, the compiler still gets to
compile the code
in local sections. This makes it straightforward to combine several files
of ATS code into
a single one.
[…] In addition, one needs to copy the CATS files generated from the ATS
source (of CATS-parsemit).
This can be done by issuing:
make pkgreloc
From CATS-parsemit or from CATS-atscc2js? I don’t know the pkgreloc
target.
From CATS-atscc2js seems to deal with the hidden directory .CATS-parsemit , this do the same as copying manually and I still have
compilation errors:
./.CATS-parsemit/catsparse_include_all_dats.c:165072:22: error: ‘
CATSPARSE__filename_stdin’ undeclared (first use in this function)
and
./.CATS-parsemit/catsparse_include_all_dats.c:165125:22: error: ‘
CATSPARSE__location_dummy’ undeclared (first use in this function)
OK, I’ve seen there is a newer 0.1.13. Installing from the script I use
just fetched the previous one.Le vendredi 22 mai 2015 20:08:18 UTC+2, Yannick Duchêne a écrit :
Le vendredi 22 mai 2015 19:16:42 UTC+2, gmhwxi a écrit :
Your version of ATS2 is not newer enough
I have 0.1.12 Isn’t it the lastest?
I will try to install from GitHub (ATS, not just Contrib), but I feel to
remember ATS1 is required to build ATS2 from GitHub.
Basically, one needs to copy the SATS files provided by CATS-parsemit to a
local directory, say,
.CATS-parsemit. In addition, one needs to copy the CATS files generated
from the ATS source (of CATS-parsemit).
This can be done by issuing:
make pkgreloc
These CATS files replace the need for library binaries (in the form of .a
or .so files), thus greatly enhancing portability.
Now just do ‘make all’, and ‘atscc2js’ should be built properly.
Just to have all the implements available to the compiler.
If a file is included, then the dynload for the file is not needed.
It is kind of being inlined.On Thursday, May 28, 2015 at 5:55:59 PM UTC-4, Yannick Duchêne wrote:
I see, it’s like encapsulation, but if whatever in a local section cannot
be used in another part, what’s the intended effect if not side effetcs? Or
is it about externs? But if so, then what about dynloads?
Le jeudi 28 mai 2015 20:52:50 UTC+2, gmhwxi a écrit :
Well, the point is to make sure that whatever is included in the local
sections cannot
be used in other parts of the code. However, the compiler still gets to
compile the code
in local sections. This makes it straightforward to combine several files
of ATS code into
a single one.
Basically, one needs to copy the SATS files provided by CATS-parsemit to
a local directory, say,
.CATS-parsemit. In addition, one needs to copy the CATS files generated
from the ATS source (of CATS-parsemit).
This can be done by issuing:
make pkgreloc
These CATS files replace the need for library binaries (in the form of .a
or .so files), thus greatly enhancing portability.
Now just do ‘make all’, and ‘atscc2js’ should be built properly.
Just to have all the implements available to the compiler.
Okay, I see. So may be unless an application is so big it needs separate
units to be type-checked within a reasonable amount of time, this may be
more simple to always use includes in locals.
If a file is included, then the dynload for the file is not needed.
It is kind of being inlined.
I have not yet looked at it, but I have a question too: how do one make use
of what’s included in the local sections, as this is not like a namespace?
Or is this only for side effects?Le jeudi 28 mai 2015 18:14:48 UTC+2, gmhwxi a écrit :
This is just to make sure that the contents in these files cannot
interfere with each other.
If you like, you could also do
val () = let #include “…” in () end
On Thursday, May 28, 2015 at 12:08:25 PM UTC-4, Zhiqiang Ren wrote:
Well, the point is to make sure that whatever is included in the local
sections cannot
be used in other parts of the code. However, the compiler still gets to
compile the code
in local sections. This makes it straightforward to combine several files
of ATS code into
a single one.On Thursday, May 28, 2015 at 1:39:43 PM UTC-4, Yannick Duchêne wrote:
I have not yet looked at it, but I have a question too: how do one make
use of what’s included in the local sections, as this is not like a
namespace? Or is this only for side effects?
Le jeudi 28 mai 2015 18:14:48 UTC+2, gmhwxi a écrit :
This is just to make sure that the contents in these files cannot
interfere with each other.
If you like, you could also do
val () = let #include “…” in () end
On Thursday, May 28, 2015 at 12:08:25 PM UTC-4, Zhiqiang Ren wrote:
Your version of ATS2 is not newer enough :)On Fri, May 22, 2015 at 1:12 PM, ‘Yannick Duchêne’ via ats-lang-users < ats-lan...@googlegroups.com> wrote:
Le vendredi 22 mai 2015 18:41:51 UTC+2, Yannick Duchêne a écrit :
Le vendredi 22 mai 2015 18:18:35 UTC+2, gmhwxi a écrit :
[…] In addition, one needs to copy the CATS files generated from the ATS
source (of CATS-parsemit).
This can be done by issuing:
make pkgreloc
From CATS-parsemit or from CATS-atscc2js? I don’t know the pkgreloc
target.
From CATS-atscc2js seems to deal with the hidden directory .CATS-parsemit , this do the same as copying manually and I still have
compilation errors:
./.CATS-parsemit/catsparse_include_all_dats.c:165072:22: error: ‘
CATSPARSE__filename_stdin’ undeclared (first use in this function)
and
./.CATS-parsemit/catsparse_include_all_dats.c:165125:22: error: ‘
CATSPARSE__location_dummy’ undeclared (first use in this function)