@@ -57,13 +57,13 @@ lint (Module _ _ mn ds _) = censor (addHint (ErrorInModule mn)) $ mapM_ lintDecl
57 lintDeclaration :: Declaration -> m ()
57 lintDeclaration :: Declaration -> m ()
58 lintDeclaration = tell . f
58 lintDeclaration = tell . f
60− warningsInDecl = everythingWithScope stepD stepE stepB (\_ _ -> mempty) stepDo moduleNames
60+ (warningsInDecl, _, _, _, _) = everythingWithScope stepD stepE stepB (\_ _ -> mempty) stepDo
62 f :: Declaration -> MultipleErrors
62 f :: Declaration -> MultipleErrors
63 f (PositionedDeclaration pos _ dec) = addHint (PositionedError pos) (f dec)
63 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)
65 f (TypeDeclaration name ty) = addHint (ErrorInTypeDeclaration name) (checkTypeVars ty)
65 f (TypeDeclaration name ty) = addHint (ErrorInTypeDeclaration name) (checkTypeVars ty)
66− f dec = warningsInDecl dec <> checkTypeVarsInDecl dec
66+ f dec = warningsInDecl moduleNames dec <> checkTypeVarsInDecl dec
68 stepD :: S.Set Ident -> Declaration -> MultipleErrors
68 stepD :: S.Set Ident -> Declaration -> MultipleErrors
69 stepD _ (TypeClassDeclaration name _ _ decls) = foldMap go decls
69 stepD _ (TypeClassDeclaration name _ _ decls) = foldMap go decls