Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,244
    • Issues 5,244
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1972
Closed
Open
Issue created Dec 11, 2007 by Neil Mitchell@ndmitchellReporter

Shadowed binding warning message lacks essential information

1: {-# OPTIONS_GHC -Wall #-}
2: 
3: module Temp where
4: 
5: data Data = Data {name :: String}
6: 
7: h :: a -> a
8: h name = name

Temp.hs:8:2:
    Warning: This binding for `name' shadows an existing binding
             In the definition of `h'

The problem is that this warning talks only about h, and the location of h (line 8). It doesn't mention that name is also a record selector, or where its defined. My particular instance of this bug involved the data declaration being in a separate module, in code contributed by someone else that I hadn't written.

Suggestion: mention one of "its a record field name", "its from Data", "its defined on line x, in file y"

Trac metadata
Trac field Value
Version 6.8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking