From: Luke Lau Date: Tue, 30 Jul 2019 21:25:31 +0000 (+0100) Subject: Add notes on typechecking X-Git-Url: https://git.lukelau.me/?p=scheme.git;a=commitdiff_plain;h=05682b323f3365dba3f7f0192016f1d05152b418 Add notes on typechecking --- diff --git a/typecheck.md b/typecheck.md new file mode 100644 index 0000000..c892a59 --- /dev/null +++ b/typecheck.md @@ -0,0 +1,12 @@ +# lets + +Lets bindings are recursive, and so to handle this the typechecker +first creates a dependency graph of the bindings with `graph`. + +The strongly connected components are then computed with `scss`, and +then when creating the environment for the let body: + +1. For each strongly connected component (scc) +2. Insert the offsets of each component in the scc into the environment +3. Codegen the bindings in the scc +4. Pass on the environment to the next scc