@@ -789,8 +789,9 @@ updateSolved' [] x = x
789789updateSolved' xs (Bind n (Hole ty) t)
790790 | Just v <- lookup n xs
791791 = case xs of
792− [_] -> psubst n v t
793− _ -> psubst n v (updateSolved' xs t)
792+ [_] -> substV v $ psubst n v t -- some may be Vs! Can't assume
793+ -- explicit names
794+ _ -> substV v $ psubst n v (updateSolved' xs t)
794795updateSolved' xs (Bind n b t)
795796 | otherwise = Bind n (fmap (updateSolved' xs) b) (updateSolved' xs t)
796797updateSolved' xs (App f a)
@@ -838,7 +839,7 @@ updateProblems ctxt ns ps inj holes = up ns ps where
838839 y' = updateSolved ns y
839840 err' = updateError ns err
840841 env' = updateEnv ns env in
841−-- trace ("Updating " ++ show (x',y')) $
842+-- trace ("Updating " ++ show (x',y')) $
842843 case unify ctxt env' x' y' inj holes while of
843844 OK (v, []) -> -- trace ("Added " ++ show v ++ " from " ++ show (x', y')) $
844845 up (ns ++ v) ps