@@ -57,13 +57,13 @@ lint (Module _ _ mn ds _) = censor (addHint (ErrorInModule mn)) $ mapM_ lintDecl
5757 lintDeclaration :: Declaration -> m ()
5858 lintDeclaration = tell . f
5959 where
60− warningsInDecl = everythingWithScope stepD stepE stepB (\_ _ -> mempty) stepDo moduleNames
60+ (warningsInDecl, _, _, _, _) = everythingWithScope stepD stepE stepB (\_ _ -> mempty) stepDo
6161
6262 f :: Declaration -> MultipleErrors
6363 f (PositionedDeclaration pos _ dec) = addHint (PositionedError pos) (f dec)
64− f dec@(ValueDeclaration name _ _ _) = addHint (ErrorInValueDeclaration name) (warningsInDecl dec <> checkTypeVarsInDecl dec)
64+ f dec@(ValueDeclaration name _ _ _) = addHint (ErrorInValueDeclaration name) (warningsInDecl moduleNames dec <> checkTypeVarsInDecl dec)
6565 f (TypeDeclaration name ty) = addHint (ErrorInTypeDeclaration name) (checkTypeVars ty)
66− f dec = warningsInDecl dec <> checkTypeVarsInDecl dec
66+ f dec = warningsInDecl moduleNames dec <> checkTypeVarsInDecl dec
6767
6868 stepD :: S.Set Ident -> Declaration -> MultipleErrors
6969 stepD _ (TypeClassDeclaration name _ _ decls) = foldMap go decls