[commit: ghc] wip/shnajd-TTG-SrcLocs: [TTG: Handling Source Locations] Foundation and Pat Trac Issue: #15495 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). (6be401f)

git at git.haskell.org git at git.haskell.org
Sat Nov 10 09:20:33 UTC 2018


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

On branch  : wip/shnajd-TTG-SrcLocs
Link       : http://ghc.haskell.org/trac/ghc/changeset/6be401f9cb9cfc2fa0836fd1775e9d58b781c534/ghc

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

commit 6be401f9cb9cfc2fa0836fd1775e9d58b781c534
Author: Shayan-Najd <sh.najd at gmail.com>
Date:   Thu Nov 8 22:09:13 2018 +0000

    [TTG: Handling Source Locations] Foundation and Pat
    Trac Issue: #15495
    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` view pattern
    - some type annotation are necessarily updated updated (e.g., `Pat p` --> `Pat (GhcPass p)`)


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

6be401f9cb9cfc2fa0836fd1775e9d58b781c534
 compiler/basicTypes/Name.hs        |   8 +-
 compiler/basicTypes/SrcLoc.hs      | 125 ++++++++--
 compiler/deSugar/Check.hs          |  38 +--
 compiler/deSugar/DsArrows.hs       |   3 +-
 compiler/deSugar/DsExpr.hs         |   2 +-
 compiler/deSugar/DsListComp.hs     |   2 +-
 compiler/deSugar/DsMeta.hs         |   3 +-
 compiler/deSugar/DsUtils.hs        |  47 ++--
 compiler/deSugar/ExtractDocs.hs    |   4 +-
 compiler/deSugar/Match.hs          |  24 +-
 compiler/deSugar/MatchCon.hs       |   3 +-
 compiler/hsSyn/Convert.hs          | 107 ++++----
 compiler/hsSyn/HsPat.hs            |  74 ++++--
 compiler/hsSyn/HsPat.hs-boot       |   3 +-
 compiler/hsSyn/HsTypes.hs          |   4 +-
 compiler/hsSyn/HsUtils.hs          | 172 +++++++------
 compiler/main/GHC.hs               |   4 +
 compiler/main/HeaderInfo.hs        |  57 ++---
 compiler/main/HscStats.hs          |   3 +-
 compiler/main/HscTypes.hs          |   3 +-
 compiler/parser/Lexer.x            |  32 +--
 compiler/parser/Parser.y           | 103 ++++----
 compiler/parser/RdrHsSyn.hs        | 486 +++++++++++++++++++------------------
 compiler/rename/RnBinds.hs         |  10 +-
 compiler/rename/RnExpr.hs          |   7 +-
 compiler/rename/RnPat.hs           |  50 ++--
 compiler/rename/RnSplice.hs        |   8 +-
 compiler/rename/RnTypes.hs         | 120 ++++-----
 compiler/typecheck/TcBinds.hs      |   3 +-
 compiler/typecheck/TcErrors.hs     |   3 +-
 compiler/typecheck/TcHsSyn.hs      |   3 +-
 compiler/typecheck/TcHsType.hs     |   1 +
 compiler/typecheck/TcPat.hs        |  13 +-
 compiler/typecheck/TcPatSyn.hs     |  41 ++--
 compiler/typecheck/TcRnDriver.hs   |  21 +-
 compiler/typecheck/TcRnExports.hs  |   4 +-
 compiler/typecheck/TcRnMonad.hs    |  27 ++-
 compiler/typecheck/TcTyClsDecls.hs |  27 ++-
 compiler/typecheck/TcTyDecls.hs    |  31 +--
 compiler/utils/Binary.hs           |   2 +-
 ghc/GHCi/UI/Info.hs                |   7 +-
 testsuite/tests/ghc-api/T6145.hs   |  13 +-
 utils/ghctags/Main.hs              |   2 +-
 utils/haddock                      |   2 +-
 44 files changed, 968 insertions(+), 734 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 6be401f9cb9cfc2fa0836fd1775e9d58b781c534


More information about the ghc-commits mailing list