[commit: ghc] master: Only use locally bound variables in pattern synonym declarations (d819e41)

git at git.haskell.org git at git.haskell.org
Mon Mar 27 10:28:23 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d819e416a2a537b78b2698dfe753aa68dfb8b837/ghc

>---------------------------------------------------------------

commit d819e416a2a537b78b2698dfe753aa68dfb8b837
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Mon Mar 27 11:24:25 2017 +0100

    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


>---------------------------------------------------------------

d819e416a2a537b78b2698dfe753aa68dfb8b837
 compiler/rename/RnBinds.hs                       | 41 +++++++++++++++++++++---
 compiler/rename/RnEnv.hs                         | 31 ++++++++++++++----
 testsuite/tests/patsyn/should_fail/T13470.hs     | 20 ++++++++++++
 testsuite/tests/patsyn/should_fail/T13470.stderr |  8 +++++
 testsuite/tests/patsyn/should_fail/all.T         |  1 +
 5 files changed, 89 insertions(+), 12 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc d819e416a2a537b78b2698dfe753aa68dfb8b837


More information about the ghc-commits mailing list