[commit: ghc] ghc-8.0: Forbid variables to be parents in import lists. (638c1d4)

git at git.haskell.org git at git.haskell.org
Tue May 10 13:05:21 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/638c1d43b6f7258a5f1936482f11d30b6b089c1d/ghc

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

commit 638c1d43b6f7258a5f1936482f11d30b6b089c1d
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


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

638c1d43b6f7258a5f1936482f11d30b6b089c1d
 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 638c1d43b6f7258a5f1936482f11d30b6b089c1d


More information about the ghc-commits mailing list