From be6537f9b90575b8d939c289f54a790147a9b745 Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Tue, 23 May 2023 21:29:27 +0200 Subject: [PATCH] Fix eager instantiation for deeply structured types --- src/Checker.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Checker.cc b/src/Checker.cc index 90716ddfd..4beb92297 100644 --- a/src/Checker.cc +++ b/src/Checker.cc @@ -7,7 +7,7 @@ // TODO Fix TVSub to use TVar.Id instead of the pointer address -// Optimise constraint solving by solving some constraints during inference +// TODO Deferred diagnostics #include #include @@ -519,12 +519,11 @@ namespace bolt { addConstraint(NewConstraint); } - // Note the call to solve? This is because constraints may have already + // Note the call to simplify? This is because constraints may have already // been solved, with some unification variables being erased. To make - // sure we instantiate unification variables that are still in use + // sure we instantiate unification variables that are still in use // we solve before substituting. - // TODO perform a full solve() - return find(F->Type)->substitute(Sub); + return simplify(F->Type)->substitute(Sub); } }