The simplest types in ATS are primitive types, which are used to classify primitive values. For instance, we have the primitive types int and double, which classify integers (in a fixed range) and floating point numbers (of double precision), respectively.
In the current implementation of ATS (Postiats), a program in ATS is first compiled into one in C (conforming to the C99 standard), which can then be compiled to object code by a compiler for C such as gcc. In the compilation from ATS to C, each of the types int, double and void in ATS is translated to the type of the same name in C.
There are many other primitive types in ATS, and I will introduce them gradually. Some commonly used primitive types are listed as follows:
bool: This type is for boolean values true and false, and it is translated into the int type in C.
char: This type is translated into the type in C for characters.
schar: This type is translated into the type in C for signed characters.
uchar: This type is translated into the type in C for unsigned characters.
float: This type is translated into the type in C for floating point numbers of single precision.
uint: This type is translated into the type in C for unsigned integers.
lint: This type is translated into the type in C for long integers.
ulint: This type is translated into the type in C for unsigned long integers.
llint: This type is translated into the type in C for long long integers.
ullint: This type is translated into the type in C for unsigned long long integers.
size_t: This type is translated into the type in C of the same name, which is for unsigned integers of certain precision. Usually, the type size_t can be treated as the type ulint and vice versa.
ssize_t: This type is translated into the type in C of the same name, which is for signed integers of certain precision. Usually, the type ssize_t can be treated as the type lint and vice versa.
sint: This type is translated into the type in C for short integers.
usint: This type is translated into the type in C for unsigned short integers.
string: This type is for strings, and its translation in C is the type for pointers. I will explain this translation elsewhere.