Changes between Version 3 and Version 4 of Commentary/Compiler/Packages


Ignore:
Timestamp:
May 17, 2011 6:02:11 AM (4 years ago)
Author:
dterei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Packages

    v3 v4  
    5656== Special packages == 
    5757 
    58 Certain packages are special, in the sense that GHC knows about their existence and something about their contents.  Any [wiki:Commentary/Compiler/NameType Name] that is [wiki:Commentary/Compiler/KnownKey wired-in] (see [[GhcFile(compiler/prelude/PrelNames.lhs)]]) must by definition contain a {{{Module}}}, and that module must therefore contain a {{{PackageId}}}.  But the {{{PackageId}}} is a full package name, including the version, so does this mean we have to somehow find out the version of the {{{base}}} package (for example) and bake it into the GHC binary? 
     58Certain packages are special, in the sense that GHC knows about their existence and something about their contents.  Any [wiki:Commentary/Compiler/NameType Name] that is [wiki:Commentary/Compiler/WiredIn wired-in] (see [[GhcFile(compiler/prelude/PrelNames.lhs)]]) must by definition contain a {{{Module}}}, and that module must therefore contain a {{{PackageId}}}.  But the {{{PackageId}}} is a full package name, including the version, so does this mean we have to somehow find out the version of the {{{base}}} package (for example) and bake it into the GHC binary? 
    5959 
    6060We took the view that it should be possible to upgrade these packages independently of GHC, so long as you don't change any of the information that GHC knows about the package (eg. the type of {{{fromIntegral}}} or what module things come from).  Therefore we shouldn't bake in the version of any packages.  So the {{{PackageId}}} for the {{{base}}} package inside GHC is simply {{{base}}}: we explicitly strip off the version number for special packages wherever they occur.