
#12615: Record pattern synonyms cause spurious name shadowing warnings -------------------------------------+------------------------------------- Reporter: gelisam | Owner: mpickering Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): This isn't actually a problem with record pattern synonyms per se but something that is exposed by them. You can also trigger the problem with {{{#!hs {-# LANGUAGE NoImplicitPrelude, PatternSynonyms #-} {-# OPTIONS_GHC -Wall #-} module Test where x = () pattern Point2 :: () -> () -> ((), ()) pattern Point2 x y = (x, y) }}} This is because the way checking for shadowed names works assumes that all patterns are introducing binders. Clearly in the case of pattern synonyms this assumption fails so we need to refine this check. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12615#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler