[commit: ghc] master: Replace (SourceText, FastString) with StringLiteral data type (15dd700)

git at git.haskell.org git at git.haskell.org
Sun Aug 2 08:25:49 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/15dd7007275a5dcdae2c9f104773eceaa56590dc/ghc

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

commit 15dd7007275a5dcdae2c9f104773eceaa56590dc
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Sun Aug 2 10:26:59 2015 +0200

    Replace (SourceText,FastString) with StringLiteral data type
    
    Summary:
    Phab:D907 introduced SourceText for a number of data types, by replacing
    FastString with (SourceText,FastString). Since this has an Outputable
    instance, no warnings are generated when ppr is called on it, but
    unexpected output is generated. See Phab:D1096 for an example of this.
    
    Replace the (SourceText,FastString) tuples with a new data type,
    ```lang=hs
    data StringLiteral = StringLiteral SourceText FastString
    ```
    
    Update haddock submodule accordingly
    
    Test Plan: ./validate
    
    Reviewers: hvr, austin, rwbarton, trofi, bgamari
    
    Reviewed By: trofi, bgamari
    
    Subscribers: thomie, trofi, rwbarton, mpickering
    
    Differential Revision: https://phabricator.haskell.org/D1101
    
    GHC Trac Issues: #10692


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

15dd7007275a5dcdae2c9f104773eceaa56590dc
 compiler/basicTypes/BasicTypes.hs                  | 24 +++++++++++-----
 compiler/deSugar/DsExpr.hs                         |  2 +-
 compiler/hsSyn/HsExpr.hs                           | 18 +++++++-----
 compiler/hsSyn/HsImpExp.hs                         | 20 ++++++-------
 compiler/iface/MkIface.hs                          |  2 +-
 compiler/main/DriverMkDepend.hs                    |  3 +-
 compiler/main/GhcMake.hs                           |  2 +-
 compiler/parser/Parser.y                           | 33 +++++++++++-----------
 compiler/parser/RdrHsSyn.hs                        |  8 +++---
 compiler/rename/RnNames.hs                         | 13 +++++----
 compiler/utils/Binary.hs                           |  9 ++++++
 ghc/InteractiveUI.hs                               |  6 ++--
 .../tests/ghc-api/annotations/stringSource.hs      | 15 ++++++----
 utils/haddock                                      |  2 +-
 14 files changed, 93 insertions(+), 64 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 15dd7007275a5dcdae2c9f104773eceaa56590dc


More information about the ghc-commits mailing list