Changes between Version 11 and Version 12 of Commentary/Libraries


Ignore:
Timestamp:
Aug 28, 2009 11:34:36 AM (6 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Libraries

    v11 v12  
    11= GHC Commentary: Libraries = 
    22 
    3 All GHC installations contain a set of libraries called the '''boot packages'''.  They are so called because the boot packages are the ones required for GHC to compile itself (the stage-2 compiler).  
     3All GHC build trees contain a set of libraries: 
    44 
    5 The boot packages, along with the other subcomponents of the GHC build system, are in the file `packages` in a GHC tree. To get a list of them, you can run `make show VALUE=PACKAGES` in a configured GHC build tree.  (This variable is set in `$(TOP)/ghc.mk`.) 
     5 * The '''Boot Packages''' are the libraries that GHC's source code imports.  Obviously you need the boot packages to build GHC at all (whether the stage-1 or stage-2 compiler). 
     6 
     7 * The '''Zero-boot Packages''' are a small subset of the boot packages.  Since GHC's source code imports the boot packages, ''even the bootstrap compiler must have the boot packages available''.  But for certain fast-moving boot packages (eg Cabal), we don't want to rely on the user having installed a bang-up-to-date version of the package.  So we begin the entire build process by installing the zero-boot packages in the bootstrap compiler.  (This installation is purely local to the build tree.)  The bootstrap compiler is expected to have all other (non-zero-) boot packages already installed. 
     8 
     9As time goes on, a Zero-boot package may become an ordinary boot package, because the bootstrap compiler is expected to have (a sufficiently up to date) version of the package already. 
     10 
     11The Boot Packages, along with the other subcomponents of the GHC build system, are in the file `packages` in a GHC tree. To get a list of them, you can run `make show VALUE=PACKAGES` in a configured GHC build tree.  (This variable is set in `$(TOP)/ghc.mk`.) 
     12 
     13== Classifying the boot packages == 
     14 
     15A second important classification of the boot packages is as follows: 
     16 
     17 * '''INDEPENDENT''': Independently maintained (e.g. time, haskeline) 
     18 * '''COUPLED''': Tightly coupled to GHC, but used by others (base) 
     19 * '''SPECIFIC''': Totally specific to GHC (e.g. template-haskell, DPH) 
     20 
     21Most boot libraries are INDEPENDENT.  INDEPENDENT libraries have a 
     22master repository somewhere separate from the GHC repositories. 
     23 
     24== Structure of the boot packages == 
    625 
    726 * At the root of the hierarchy we have '''`ghc-prim`'''. As the name implies, this package contains the most primitive types and functions. It only contains a handful of modules, including `GHC.Prim` (which contains `Int#`, `+#`, etc) and `GHC.Bool`, containing the `Bool` datatype. 
     
    3655    * `Win32` 
    3756The `haskell98`, `old-time` and `random` packages are mostly only needed for Haskell 98 support, although `dph` currently uses `random` too. 
     57 
     58The current classification of packages is: 
     59  * SPECIFIC: `ghc-prim`, `template-haskell` 
     60  * COUPLED: `base` 
     61  * INDEPENDENT and Zero-Boot: `Cabal`, `filepath` 
     62  * INDEPENDENT: all other packages