From 05682b323f3365dba3f7f0192016f1d05152b418 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Tue, 30 Jul 2019 22:25:31 +0100 Subject: [PATCH] Add notes on typechecking --- typecheck.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 typecheck.md 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 -- 2.30.2