[commit: ghc] master: Rename literal constructors (13bb4bf)

git at git.haskell.org git at git.haskell.org
Thu Nov 22 18:42:32 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/13bb4bf44e6e690133be334bbf0c63fcae5db34a/ghc

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

commit 13bb4bf44e6e690133be334bbf0c63fcae5db34a
Author: Sylvain Henry <hsyl20 at gmail.com>
Date:   Thu Nov 22 11:31:16 2018 -0500

    Rename literal constructors
    
    In a previous patch we replaced some built-in literal constructors
    (MachInt, MachWord, etc.) with a single LitNumber constructor.
    
    In this patch we replace the `Mach` prefix of the remaining constructors
    with `Lit` for consistency (e.g., LitChar, LitLabel, etc.).
    
    Sadly the name `LitString` was already taken for a kind of FastString
    and it would become misleading to have both `LitStr` (literal
    constructor renamed after `MachStr`) and `LitString` (FastString
    variant). Hence this patch renames the FastString variant `PtrString`
    (which is more accurate) and the literal string constructor now uses the
    least surprising `LitString` name.
    
    Both `Literal` and `LitString/PtrString` have recently seen breaking
    changes so doing this kind of renaming now shouldn't harm much.
    
    Reviewers: hvr, goldfire, bgamari, simonmar, jrtc27, tdammers
    
    Subscribers: tdammers, rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4881


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

13bb4bf44e6e690133be334bbf0c63fcae5db34a
 compiler/basicTypes/Literal.hs                     | 380 +++++++++++----------
 compiler/cmm/CLabel.hs                             |   4 +-
 compiler/cmm/CmmType.hs                            |   2 +-
 compiler/codeGen/StgCmmCon.hs                      |   2 +-
 compiler/codeGen/StgCmmUtils.hs                    |  28 +-
 compiler/coreSyn/CoreOpt.hs                        |   8 +-
 compiler/coreSyn/CorePrep.hs                       |   8 +-
 compiler/coreSyn/CoreSyn.hs                        |  24 +-
 compiler/coreSyn/CoreUnfold.hs                     |   2 +-
 compiler/coreSyn/CoreUtils.hs                      |   8 +-
 compiler/coreSyn/MkCore.hs                         |   6 +-
 compiler/deSugar/DsCCall.hs                        |   4 +-
 compiler/deSugar/DsForeign.hs                      |   6 +-
 compiler/deSugar/DsMonad.hs                        |   4 +-
 compiler/deSugar/DsUtils.hs                        |   4 +-
 compiler/deSugar/Match.hs                          |   4 +-
 compiler/deSugar/MatchLit.hs                       |  38 +--
 compiler/ghci/ByteCodeAsm.hs                       |  20 +-
 compiler/ghci/ByteCodeGen.hs                       |  42 +--
 compiler/llvmGen/Llvm/Types.hs                     |   3 +-
 compiler/main/Finder.hs                            |   6 +-
 compiler/nativeGen/Dwarf/Constants.hs              |   2 +-
 compiler/nativeGen/Dwarf/Types.hs                  |   2 +-
 compiler/nativeGen/PPC/Ppr.hs                      |   6 +-
 compiler/nativeGen/SPARC/Ppr.hs                    |   8 +-
 compiler/nativeGen/X86/Ppr.hs                      |  46 +--
 compiler/prelude/PrelRules.hs                      |  86 ++---
 compiler/simplCore/SetLevels.hs                    |   2 +-
 compiler/simplCore/Simplify.hs                     |   4 +-
 compiler/simplStg/UnariseStg.hs                    |   4 +-
 compiler/stgSyn/CoreToStg.hs                       |   4 +-
 compiler/stranal/WwLib.hs                          |   2 +-
 compiler/typecheck/TcEvTerm.hs                     |   2 +-
 compiler/typecheck/TcSplice.hs                     |   2 +-
 compiler/utils/BufWrite.hs                         |   8 +-
 compiler/utils/FastString.hs                       |  58 ++--
 compiler/utils/Outputable.hs                       |   2 +-
 compiler/utils/Pretty.hs                           |  22 +-
 testsuite/tests/plugins/HomePackagePlugin.hs       |   2 +-
 .../tests/plugins/simple-plugin/Simple/Plugin.hs   |   4 +-
 40 files changed, 442 insertions(+), 427 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 13bb4bf44e6e690133be334bbf0c63fcae5db34a


More information about the ghc-commits mailing list