[commit: ghc] master: Rename PackageId to PackageKey, distinguishing it from Cabal's PackageId. (4bebab2)

git at git.haskell.org git at git.haskell.org
Mon Jul 21 15:47:25 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4bebab25e4c9a3bfccc491d4dd13c685629cd1de/ghc

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

commit 4bebab25e4c9a3bfccc491d4dd13c685629cd1de
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Sat Jul 19 17:11:08 2014 +0100

    Rename PackageId to PackageKey, distinguishing it from Cabal's PackageId.
    
    Summary:
    Previously, both Cabal and GHC defined the type PackageId, and we expected
    them to be roughly equivalent (but represented differently).  This refactoring
    separates these two notions.
    
    A package ID is a user-visible identifier; it's the thing you write in a
    Cabal file, e.g. containers-0.9.  The components of this ID are semantically
    meaningful, and decompose into a package name and a package vrsion.
    
    A package key is an opaque identifier used by GHC to generate linking symbols.
    Presently, it just consists of a package name and a package version, but
    pursuant to #9265 we are planning to extend it to record other information.
    Within a single executable, it uniquely identifies a package.  It is *not* an
    InstalledPackageId, as the choice of a package key affects the ABI of a package
    (whereas an InstalledPackageId is computed after compilation.)  Cabal computes
    a package key for the package and passes it to GHC using -package-name (now
    *extremely* misnamed).
    
    As an added bonus, we don't have to worry about shadowing anymore.
    
    As a follow on, we should introduce -current-package-key having the same role as
    -package-name, and deprecate the old flag.  This commit is just renaming.
    
    The haddock submodule needed to be updated.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: simonpj, simonmar, hvr, austin
    
    Subscribers: simonmar, relrod, carter
    
    Differential Revision: https://phabricator.haskell.org/D79
    
    Conflicts:
    	compiler/main/HscTypes.lhs
    	compiler/main/Packages.lhs
    	utils/haddock


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

4bebab25e4c9a3bfccc491d4dd13c685629cd1de
 compiler/basicTypes/DataCon.lhs     |   2 +-
 compiler/basicTypes/Module.lhs      | 136 ++++++++++++++++++------------------
 compiler/basicTypes/Module.lhs-boot |   6 +-
 compiler/basicTypes/Name.lhs        |   2 +-
 compiler/basicTypes/RdrName.lhs     |   2 +-
 compiler/cmm/CLabel.hs              |  50 ++++++-------
 compiler/cmm/CmmParse.y             |   4 +-
 compiler/codeGen/StgCmmCon.hs       |   4 +-
 compiler/codeGen/StgCmmExtCode.hs   |   6 +-
 compiler/codeGen/StgCmmHeap.hs      |   2 +-
 compiler/codeGen/StgCmmLayout.hs    |   4 +-
 compiler/codeGen/StgCmmMonad.hs     |   2 +-
 compiler/codeGen/StgCmmProf.hs      |   6 +-
 compiler/codeGen/StgCmmTicky.hs     |  12 ++--
 compiler/codeGen/StgCmmUtils.hs     |   4 +-
 compiler/coreSyn/CorePrep.lhs       |   4 +-
 compiler/deSugar/Coverage.lhs       |   8 +--
 compiler/deSugar/DsForeign.lhs      |   4 +-
 compiler/deSugar/DsMeta.hs          |   4 +-
 compiler/ghci/ByteCodeLink.lhs      |   6 +-
 compiler/ghci/DebuggerUtils.hs      |   2 +-
 compiler/ghci/Linker.lhs            |  24 +++----
 compiler/hsSyn/Convert.lhs          |   4 +-
 compiler/iface/BinIface.hs          |   4 +-
 compiler/iface/LoadIface.lhs        |   6 +-
 compiler/iface/MkIface.lhs          |  14 ++--
 compiler/main/CodeOutput.lhs        |   8 +--
 compiler/main/DriverPipeline.hs     |  24 +++----
 compiler/main/DynFlags.hs           |  10 +--
 compiler/main/Finder.lhs            |  22 +++---
 compiler/main/GHC.hs                |  16 ++---
 compiler/main/GhcMake.hs            |   2 +-
 compiler/main/HscMain.hs            |  20 +++---
 compiler/main/HscTypes.lhs          |  22 +++---
 compiler/main/InteractiveEval.hs    |   2 +-
 compiler/main/PackageConfig.hs      |  22 +++---
 compiler/main/Packages.lhs          |  84 +++++++++++-----------
 compiler/main/SysTools.lhs          |   6 +-
 compiler/main/TidyPgm.lhs           |   4 +-
 compiler/nativeGen/AsmCodeGen.lhs   |   6 +-
 compiler/nativeGen/X86/CodeGen.hs   |   6 +-
 compiler/parser/Lexer.x             |   2 +-
 compiler/prelude/ForeignCall.lhs    |   2 +-
 compiler/prelude/PrelNames.lhs      |  18 ++---
 compiler/prelude/PrimOp.lhs         |   4 +-
 compiler/rename/RnNames.lhs         |   2 +-
 compiler/rename/RnSource.lhs        |  26 +++----
 compiler/typecheck/TcEnv.lhs        |   2 +-
 compiler/typecheck/TcErrors.lhs     |   6 +-
 compiler/typecheck/TcGenDeriv.lhs   |   8 +--
 compiler/typecheck/TcRnDriver.lhs   |   4 +-
 compiler/typecheck/TcRnTypes.lhs    |   6 +-
 compiler/typecheck/TcSplice.lhs     |  14 ++--
 docs/users_guide/7.10.1-notes.xml   |  21 ++++++
 ghc/InteractiveUI.hs                |  12 ++--
 utils/haddock                       |   2 +-
 56 files changed, 363 insertions(+), 342 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 4bebab25e4c9a3bfccc491d4dd13c685629cd1de


More information about the ghc-commits mailing list