[commit: ghc] master: [TTG: Handling Source Locations] Foundation and Pat (509d5be)

git at git.haskell.org git at git.haskell.org
Sat Nov 24 10:30:47 UTC 2018


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

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

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

commit 509d5be69c7507ba5d0a5f39ffd1613a59e73eea
Author: Shayan-Najd <sh.najd at gmail.com>
Date:   Thu Nov 22 01:23:29 2018 +0000

    [TTG: Handling Source Locations] Foundation and Pat
    
    This patch removes the ping-pong style from HsPat (only, for now),
    using the plan laid out at
    https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution
    A).
    
    - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced
    - some instances of `HasSrcSpan` are introduced
    - some constructors `L` are replaced with `cL`
    - some patterns `L` are replaced with `dL->L` view pattern
    - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`)
    
    Phab diff: D5036
    Trac Issues #15495
    
    Updates haddock submodule


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

509d5be69c7507ba5d0a5f39ffd1613a59e73eea
 compiler/basicTypes/Name.hs                        |  11 +-
 compiler/basicTypes/SrcLoc.hs                      | 132 ++++-
 compiler/deSugar/Check.hs                          |  34 +-
 compiler/deSugar/Coverage.hs                       | 149 ++---
 compiler/deSugar/Desugar.hs                        |  17 +-
 compiler/deSugar/DsArrows.hs                       | 123 ++--
 compiler/deSugar/DsBinds.hs                        |  16 +-
 compiler/deSugar/DsExpr.hs                         |  69 +--
 compiler/deSugar/DsForeign.hs                      |   9 +-
 compiler/deSugar/DsGRHSs.hs                        |   6 +-
 compiler/deSugar/DsListComp.hs                     |   7 +-
 compiler/deSugar/DsMeta.hs                         | 391 ++++++------
 compiler/deSugar/DsMonad.hs                        |   1 +
 compiler/deSugar/DsUsage.hs                        |   1 +
 compiler/deSugar/DsUtils.hs                        |  55 +-
 compiler/deSugar/ExtractDocs.hs                    |  42 +-
 compiler/deSugar/Match.hs                          |  60 +-
 compiler/deSugar/MatchCon.hs                       |   8 +-
 compiler/deSugar/MatchLit.hs                       |  16 +-
 compiler/deSugar/PmExpr.hs                         |   9 +-
 compiler/hsSyn/Convert.hs                          | 157 ++---
 compiler/hsSyn/HsPat.hs                            | 203 ++++---
 compiler/hsSyn/HsPat.hs-boot                       |   3 +-
 compiler/hsSyn/HsTypes.hs                          |   4 +-
 compiler/hsSyn/HsUtils.hs                          | 186 +++---
 compiler/main/GHC.hs                               |  10 +-
 compiler/main/HeaderInfo.hs                        | 107 ++--
 compiler/main/HscStats.hs                          |  27 +-
 compiler/main/HscTypes.hs                          |   3 +-
 compiler/parser/Lexer.x                            |  32 +-
 compiler/parser/Parser.y                           | 378 ++++++------
 compiler/parser/RdrHsSyn.hs                        | 658 +++++++++++----------
 compiler/rename/RnBinds.hs                         |  10 +-
 compiler/rename/RnExpr.hs                          |   9 +-
 compiler/rename/RnFixity.hs                        |  14 +-
 compiler/rename/RnHsDoc.hs                         |   6 +-
 compiler/rename/RnPat.hs                           | 133 +++--
 compiler/rename/RnSource.hs                        | 205 ++++---
 compiler/rename/RnSplice.hs                        |  31 +-
 compiler/rename/RnTypes.hs                         | 152 ++---
 compiler/rename/RnUtils.hs                         |   7 +-
 compiler/typecheck/TcBinds.hs                      |  59 +-
 compiler/typecheck/TcErrors.hs                     |   8 +-
 compiler/typecheck/TcGenDeriv.hs                   |  30 +-
 compiler/typecheck/TcHsSyn.hs                      | 144 +++--
 compiler/typecheck/TcHsType.hs                     |   1 +
 compiler/typecheck/TcPat.hs                        |  45 +-
 compiler/typecheck/TcPatSyn.hs                     |  62 +-
 compiler/typecheck/TcRnDriver.hs                   | 260 ++++----
 compiler/typecheck/TcRnExports.hs                  |  39 +-
 compiler/typecheck/TcRnMonad.hs                    |  39 +-
 compiler/typecheck/TcTyClsDecls.hs                 | 169 +++---
 compiler/typecheck/TcTyDecls.hs                    |  35 +-
 compiler/utils/Binary.hs                           |   2 +-
 ghc/GHCi/UI/Info.hs                                |  17 +-
 testsuite/tests/ghc-api/T6145.hs                   |  13 +-
 .../tests/parser/should_compile/KindSigs.stderr    |  12 +-
 utils/ghctags/Main.hs                              |   2 +-
 utils/haddock                                      |   2 +-
 59 files changed, 2479 insertions(+), 1951 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 509d5be69c7507ba5d0a5f39ffd1613a59e73eea


More information about the ghc-commits mailing list