@@ -949,9 +949,9 @@ checkFunctionApplication' fn (ForAll ident ty _) arg = do
949 checkFunctionApplication fn replaced arg
949 checkFunctionApplication fn replaced arg
950checkFunctionApplication' fn u@(TUnknown _) arg = do
950checkFunctionApplication' fn u@(TUnknown _) arg = do
951 arg' <- do
951 arg' <- do
952− TypedValue _ v t <- infer arg
952+ TypedValue _ arg' t <- infer arg
953− (v', t') <- instantiatePolyTypeWithUnknowns arg t
953+ (arg'', t') <- instantiatePolyTypeWithUnknowns arg' t
954− return $ TypedValue True v' t'
954+ return $ TypedValue True arg'' t'
955 let ty = (\(TypedValue _ _ t) -> t) arg'
955 let ty = (\(TypedValue _ _ t) -> t) arg'
956 ret <- fresh
956 ret <- fresh
957 u =?= function ty ret
957 u =?= function ty ret