@@ -869,9 +869,9 @@ checkFunctionApplication' fn (ForAll ident ty _) arg = do
869 checkFunctionApplication fn replaced arg
869 checkFunctionApplication fn replaced arg
870checkFunctionApplication' fn u@(TUnknown _) arg = do
870checkFunctionApplication' fn u@(TUnknown _) arg = do
871 arg' <- do
871 arg' <- do
872− TypedValue _ v t <- infer arg
872+ TypedValue _ arg' t <- infer arg
873− (v', t') <- instantiatePolyTypeWithUnknowns arg t
873+ (arg'', t') <- instantiatePolyTypeWithUnknowns arg' t
874− return $ TypedValue True v' t'
874+ return $ TypedValue True arg'' t'
875 let ty = (\(TypedValue _ _ t) -> t) arg'
875 let ty = (\(TypedValue _ _ t) -> t) arg'
876 ret <- fresh
876 ret <- fresh
877 u =?= function ty ret
877 u =?= function ty ret