Most of ATS library is template-based. There is no need for -latslib
if only templates are used.
>>fun patsopt_version() = "mac#%"
This means that patsopt_version is treated as a C macro. More precisely,
it means that the compiler never generates an interface for patsopt_version
in the generated C code.
I now feel that this is a mistake. Instead, I now declare patsopt_version as follows:
fun patsopt_version() = "ext#%"
This means that patsopt_version is treated as a C function. If used, its C interface
needs to be generated.
Only when you use functions (not function templates) implemented in ATSLIB, you
need to have -latslib.
>>generating libatsopt
Sorry, it was a typo. Should be libatslib.
As for libatsopt, it is essentially the library version of patsopt. It is primarily used for
building utilities for processing ATS code (e.g., syntax hi-lighting).