[commit: ghc] master: Forbid variables to be parents in import lists. (53f26f5)

git at git.haskell.org git at git.haskell.org
Tue May 10 09:59:09 UTC 2016


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

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

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

commit 53f26f5a45f146e1cc988bbcf76a362c877beaa2
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Tue May 10 08:41:46 2016 +0200

    Forbid variables to be parents in import lists.
    
    In the long discussion on #11432, it was decided that when a type
    constructor is parsed as a variable ((--.->) is one example) then in
    order to export the type constructor then the user should be required to
    use the ExplicitNamespaces keyword.
    
    This was implemented in quite an indirect manner in the renamer. It
    is much more direct to enforce this in the parser at the expense of
    slighty worse error messages. Further to this, the check in the
    renamer was actually slightly wrong. If the variable was in scope
    then no error was raised, this was causing panics, see #12026 for an
    example.
    
    Reviewers: austin, bgamari
    
    Subscribers: davean, skvadrik, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2181
    
    GHC Trac Issues: #12026


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

53f26f5a45f146e1cc988bbcf76a362c877beaa2
 compiler/parser/RdrHsSyn.hs                      | 18 ++++++++++++++----
 compiler/rename/RnEnv.hs                         | 23 +----------------------
 compiler/rename/RnNames.hs                       |  4 ++--
 testsuite/tests/module/T11432.stderr             | 12 +++---------
 testsuite/tests/module/{T11432.hs => T11432a.hs} |  4 +++-
 testsuite/tests/module/T11432a.stderr            |  4 ++++
 testsuite/tests/module/T12026.hs                 |  3 +++
 testsuite/tests/module/T12026.stderr             |  4 ++++
 testsuite/tests/module/all.T                     |  4 +++-
 testsuite/tests/module/mod89.stderr              | 12 +++---------
 10 files changed, 40 insertions(+), 48 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 53f26f5a45f146e1cc988bbcf76a362c877beaa2


More information about the ghc-commits mailing list