From be210b5bef15b9ea6063b9a903ba1fa41286052d Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Mon, 9 Dec 2024 12:26:27 -0800 Subject: [PATCH] Dan's suggested tweaks --- unison-runtime/src/Unison/Runtime/Machine.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unison-runtime/src/Unison/Runtime/Machine.hs b/unison-runtime/src/Unison/Runtime/Machine.hs index 1eb9167ba2..bcb6ab0922 100644 --- a/unison-runtime/src/Unison/Runtime/Machine.hs +++ b/unison-runtime/src/Unison/Runtime/Machine.hs @@ -2125,8 +2125,10 @@ codeValidate tml cc = do ntys = M.fromList $ zip (S.toList ntys0) [fty ..] rty = ntys <> rty0 ftm <- readTVarIO (freshTm cc) - rtm <- readTVarIO (refTm cc) - let rns = RN (refLookup "ty" rty) (refLookup "tm" rtm) (const Nothing) + rtm0 <- readTVarIO (refTm cc) + let rs = fst <$> tml + rtm = rtm0 `M.union` M.fromList (zip rs [ftm ..]) + rns = RN (refLookup "ty" rty) (refLookup "tm" rtm) (const Nothing) combinate (n, (r, g)) = evaluate $ emitCombs rns r n g (Nothing <$ traverse_ combinate (zip [ftm ..] tml)) `catch` \(CE cs perr) ->