@@ -210,6 +210,7 @@ replaceAllVarsWithUnknowns :: Type -> Subst Check Type
210replaceAllVarsWithUnknowns (ForAll ident ty) = replaceVarsWithUnknowns [ident] ty >>= replaceAllVarsWithUnknowns
210replaceAllVarsWithUnknowns (ForAll ident ty) = replaceVarsWithUnknowns [ident] ty >>= replaceAllVarsWithUnknowns
211replaceAllVarsWithUnknowns ty = return ty
211replaceAllVarsWithUnknowns ty = return ty
213+-- TODO: need to be careful inside a forall, since variables might be renamed
213replaceVarsWithUnknowns :: [String] -> Type -> Subst Check Type
214replaceVarsWithUnknowns :: [String] -> Type -> Subst Check Type
214replaceVarsWithUnknowns idents = flip evalStateT M.empty . everywhereM (flip extM f $ mkM g)
215replaceVarsWithUnknowns idents = flip evalStateT M.empty . everywhereM (flip extM f $ mkM g)