Add a SymbolKindTable to DAGCode, make infer_kinds() a transformation, test infer_kinds()
This adds a new attribute called sym_kind_table to DAGCode which is a SymbolKindTable. The function infer_kinds is changed to be a transformation that returns a modified DAGCode object with all symbol kinds inferred.
Since DAGCode is immutable, SymbolKindTable is changed to be immutable as well. The interface is changed to make SymbolKindTable free of side effects. To maintain efficiency, the underlying dicts are replaced with persistent dictionaries provided by pyrsistent.
This change also makes it an error when unification fails in SymbolKindTable.set()
Also this adds simple tests for kind inference.
Closes #35 by providing an interface to supply kind information when kind inference won't work
Merge request reports
Activity
mentioned in commit leap@4ac5b98b
mentioned in merge request leap!33
leap!33 tests leap against these changes, since they make the type inference a bit stricter (no longer silencing exceptions).
mentioned in commit 3ee0d157
mentioned in merge request !42