[commit: ghc] master: ApiAnnotations: Make all RdrName occurences Located (3df9563)

git at git.haskell.org git at git.haskell.org
Sun Nov 22 23:10:40 UTC 2015


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

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

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

commit 3df9563e590bbfbfe1bc9171a0e8fc93ceef690d
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Sun Nov 22 23:41:57 2015 +0100

    ApiAnnotations: Make all RdrName occurences Located
    
    At the moment the API Annotations can only be used on the ParsedSource,
    as there are changes made to the RenamedSource that prevent it from
    being used to round trip source code.
    
    It is possible to build a map from every Located Name in the
    RenamedSource from its location to the Name, which can then be used when
    resolved names are required when changing the ParsedSource.
    
    However, there are instances where the identifier is not located,
    specifically
    
      (GHC.VarPat name)
      (GHC.HsVar name)
      (GHC.UserTyVar name)
      (GHC.HsTyVar name)
    
    Replace each of the name types above with (Located name)
    
    Updates the haddock submodule.
    
    Test Plan: ./validate
    
    Reviewers: austin, goldfire, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: goldfire, thomie, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D1512
    
    GHC Trac Issues: #11019


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

3df9563e590bbfbfe1bc9171a0e8fc93ceef690d
 compiler/deSugar/Check.hs                          |  2 +-
 compiler/deSugar/Coverage.hs                       |  2 +-
 compiler/deSugar/DsArrows.hs                       |  6 +--
 compiler/deSugar/DsExpr.hs                         |  5 ++-
 compiler/deSugar/DsGRHSs.hs                        |  6 +--
 compiler/deSugar/DsMeta.hs                         | 40 ++++++++---------
 compiler/deSugar/DsUtils.hs                        |  5 ++-
 compiler/deSugar/Match.hs                          |  2 +-
 compiler/hsSyn/Convert.hs                          | 45 +++++++++++--------
 compiler/hsSyn/HsExpr.hs                           | 20 ++++-----
 compiler/hsSyn/HsPat.hs                            |  4 +-
 compiler/hsSyn/HsTypes.hs                          | 49 +++++++++++----------
 compiler/hsSyn/HsUtils.hs                          | 17 ++++----
 compiler/hsSyn/PlaceHolder.hs                      |  2 +
 compiler/main/InteractiveEval.hs                   |  3 +-
 compiler/parser/Parser.y                           | 50 +++++++++++-----------
 compiler/parser/RdrHsSyn.hs                        | 46 ++++++++++----------
 compiler/rename/RnEnv.hs                           | 10 ++---
 compiler/rename/RnExpr.hs                          | 25 +++++------
 compiler/rename/RnPat.hs                           | 23 +++++-----
 compiler/rename/RnSource.hs                        |  2 +-
 compiler/rename/RnSplice.hs                        |  5 ++-
 compiler/rename/RnTypes.hs                         | 26 +++++------
 compiler/typecheck/Inst.hs                         |  4 +-
 compiler/typecheck/TcBinds.hs                      |  4 +-
 compiler/typecheck/TcExpr.hs                       | 49 +++++++++++----------
 compiler/typecheck/TcHsSyn.hs                      | 10 ++---
 compiler/typecheck/TcHsType.hs                     | 20 ++++-----
 compiler/typecheck/TcInstDcls.hs                   |  4 +-
 compiler/typecheck/TcPat.hs                        |  4 +-
 compiler/typecheck/TcPatSyn.hs                     | 10 ++---
 compiler/typecheck/TcRnDriver.hs                   | 15 ++++---
 compiler/typecheck/TcSplice.hs                     |  3 +-
 compiler/typecheck/TcTyClsDecls.hs                 |  3 +-
 compiler/typecheck/TcTyDecls.hs                    | 13 +++---
 testsuite/tests/ghc-api/landmines/landmines.stdout |  8 ++--
 testsuite/tests/quasiquotation/T7918.hs            |  6 +--
 utils/ghctags/Main.hs                              |  2 +-
 utils/haddock                                      |  2 +-
 39 files changed, 293 insertions(+), 259 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 3df9563e590bbfbfe1bc9171a0e8fc93ceef690d


More information about the ghc-commits mailing list