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) ->