@@ -190,8 +190,14 @@ renameInModule imports exports (Module mn decls exps) =
190190 ValueDeclaration name nameKind [] Nothing <$> everywhereWithContextM' [] (mkS bindFunctionArgs `extS` bindBinders) val
191191 where
192192 bindFunctionArgs bound (Abs (Left arg) val') = return (arg : bound, Abs (Left arg) val')
193− bindFunctionArgs bound (Var name'@(Qualified Nothing ident)) | ident `notElem` bound = (,) bound <$> (Var <$> updateValueName name')
194− bindFunctionArgs bound (Var name'@(Qualified (Just _) _)) = (,) bound <$> (Var <$> updateValueName name')
193+ bindFunctionArgs bound (Var name'@(Qualified Nothing ident)) | ident `notElem` bound =
194+ (,) bound <$> (Var <$> updateValueName name')
195+ bindFunctionArgs bound (Var name'@(Qualified (Just _) _)) =
196+ (,) bound <$> (Var <$> updateValueName name')
197+ bindFunctionArgs bound (BinaryNoParens name'@(Qualified Nothing ident) v1 v2) | ident `notElem` bound =
198+ (,) bound <$> (BinaryNoParens <$> updateValueName name' <*> pure v1 <*> pure v2)
199+ bindFunctionArgs bound (BinaryNoParens name'@(Qualified (Just _) _) v1 v2) =
200+ (,) bound <$> (BinaryNoParens <$> updateValueName name' <*> pure v1 <*> pure v2)
195201 bindFunctionArgs bound other = return (bound, other)
196202 bindBinders :: [Ident] -> CaseAlternative -> Either String ([Ident], CaseAlternative)
197203 bindBinders bound c@(CaseAlternative bs _ _) = return (binderNames bs ++ bound, c)