3 Type System

We learned about the different kinds of types in Types and it is now time to see how they interact with each other. We start off easy by introducing typedef, a mechanism to give a name (or alias) to a more complex type. Among other use cases, typedefs will come in handy when working with types that have type parameters.

A significant amount of type-safety is achieved by checking if two given types are compatible. Meaning, the compiler tries to perform unification between them as detailed in Unification.

All types are organized in modules and can be addressed through paths. Modules and Paths will give a detailed explanation of the related mechanics.