So for compilation, we need a store to hold all knowledge we know, like all data structures we user has defined and how they are used. A good holder for all items is quite important for following compiling process.
We define these structures for the module:
lexical item
the operator (for now)
data structure definition
including concrete data (like records and variants but with names) and opaque type (it acts like struct type; in C)
type alias definition or type function (temporary thoughts)
It distinguishes concrete type names from reducible type functions.
FFI item
our first FFI target should be The C Programming Language. this FFI should be able to handle low level function call directly and also the value.
value definition
difference from haskell or c or c++, the language doesn't distinguish between function and value. function is merely a lambda block. Since lambda itself can't do recursive thing, so we expand let to allow recursive definition.
So for compilation, we need a store to hold all knowledge we know, like all data structures we user has defined and how they are used. A good holder for all items is quite important for following compiling process.
We define these structures for the module: