Resolve "Type-checker doesn't use the global context"
This MR adds the notion of global environment to the type-checker. The environment is denoted Environment
and is implemented through a hashmap that associates a string to a tuple containing a term and its type.
The current implementation is very bad in terms of performance, as @loutr advised me to do since i wasn't able to iron out a better implementation. Performance improvements concerning Environment
should come along with the memory model refactor in another MR.
The current Environment
is not linked with the parser in any way, and the interfacing with it is done through the addition of a constructor Const(String)
in term, representing the call to another definition.
Closes #17 (closed)
Edited by belazy