ocannl
ocannl copied to clipboard
Implement local let-bindings in the `%nn_cd` syntax
To properly support local bindings, we need to collect the type environment. Add the syntactically inferred types with the identifiers on let introduction, and look them up for identifiers when translating the body (the scope of the binding).
This is needless complexity.
This does make sense. The environment needed will hold a kind (e.g. non-diff tensor, code, array etc.) and slot (LHS, RHS1 etc.) of the bindings.