[GHC] #13470: Pattern synonyms bind variables out of scope
GHC
ghc-devs at haskell.org
Mon Mar 27 10:28:16 UTC 2017
#13470: Pattern synonyms bind variables out of scope
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: mpickering
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
| PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts | Unknown/Multiple
invalid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3377
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Matthew Pickering <matthewtpickering@…>):
In [changeset:"d819e416a2a537b78b2698dfe753aa68dfb8b837/ghc" d819e41/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="d819e416a2a537b78b2698dfe753aa68dfb8b837"
Only use locally bound variables in pattern synonym declarations
Summary:
We were using the unconstrainted `lookupOccRn` function which looked up
any variable in scope. Instead we only want to consider variables brought
into
scope by renaming the pattern on the RHS.
A few more changes to make reporting of unbound names suggest the correct
things.
Fixes #13470
Reviewers: simonpj, austin, bgamari
Reviewed By: simonpj
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3377
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13470#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list