Reputation:
For instance, I saw the following line in ATSLIB:
#define ATS_PACKNAME "ATSLIB.libats.deqarray"
What is the meaning of this line? What purpose does it serve?
Upvotes: 1
Views: 41
Reputation: 3986
Say you declare a function in a file XYZ.dats:
extern fun foo (...): ...
The ATS compiler generates a global name for foo using the full path of XYZ.dats, which is often hard to read.
If the flag ATS_PACKNAME is set, then the global name for foo is ${ATS_PACKNAME}foo, where ${ATS_PACKNAME} is the string value of ATS_PACKNAME.
http://discourse.ats-lang.org/t/ats-packname/645/2
Upvotes: 2