- ;; (let ((new-env (fold-left
- ;; (lambda (acc bind)
- ;; (let* [(bind-tvar (fresh-tvar))
- ;; (env-with-tvar (env-insert acc (car bind) bind-tvar))
- ;; (bind-res (check env-with-tvar (cadr bind)))
- ;; (bind-type (cadr bind-res))
- ;; (cs (consolidate (car bind-res)
- ;; (unify bind-type bind-tvar)))]
- ;; (substitute-env cs env-with-tvar)))
- ;; env (let-bindings x))))
- ;; (display "sccs of graph\n")
- ;; (display (sccs (graph (let-bindings x))))
- ;; (newline)
- ;; (display "env when checking body:\n\t")
- ;; (display new-env)
- ;; (newline)
- ;; (check new-env (last (let-body x)))))
-
-