#3262: Identifiers beginning with _ should not be considered for shadowing
-----------------------------+----------------------------------------------
Reporter: batterseapower | Owner:
Type: proposal | Status: new
Priority: normal | Component: Compiler
Version: 6.10.2 | Severity: trivial
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
The following program:
{{{
main = do
let _ignored = 10
let _ignored = 20
return ()
}}}
Prints this warning (when compiled with, for example, -Wall):
{{{
temp.hs:3:6:
Warning: This binding for `_ignored' shadows the existing binding
bound at temp.hs:2:6
In the binding group for: _ignored
}}}
In my opinion identifiers prefixed with _ should be ignored for the
purposes of determining shadowing in the same way as they are ignored for
the purposes of checking if something is bound but not used. So in
particular, this warning would not be generated.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3262>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs