From ba409e30ff518c5659bb9c5ea108da34fbcdb646 Mon Sep 17 00:00:00 2001 From: Paolo Capriotti Date: Thu, 10 May 2012 16:18:21 +0100 Subject: Simplify the behavior of package db flags. Previously, the `-no-user-package` and `-no-global-package` flags affected the "initial" stack only, while `user-package` and `global-packages` appended to the end of the stack. This commit changes the behavior of those flags, so that they are always applied to the stack as a whole. The effect of the GHC_PACKAGE_PATH environment variable has also been changed: terminating it with a separator now adds the default package dbs (user and global) instead of the initial stack. --- docs/users_guide/packages.xml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'docs/users_guide/packages.xml') diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml index 8df8cb953a..d1df2d4712 100644 --- a/docs/users_guide/packages.xml +++ b/docs/users_guide/packages.xml @@ -408,7 +408,7 @@ _ZCMain_main_closure see GHC's package table by running GHC with the flag. - Package databases mayb overlap, and they are arranged in a stack + Package databases may overlap, and they are arranged in a stack structure. Packages closer to the top of the stack will override (shadow) those below them. By default, the stack contains just the global and the user's package databases, in that @@ -425,9 +425,9 @@ _ZCMain_main_closure Add the package database file on top - of the current stack. Packages in additional databases read this - way will override those in the initial stack and those in - previously specified databases. + of the current stack. Packages in additional databases read this + way will override those in the initial stack and those in + previously specified databases. @@ -437,7 +437,8 @@ _ZCMain_main_closure - Prevent loading of the global package database in the initial stack. + Remove the global package database from the package database + stack. @@ -447,7 +448,8 @@ _ZCMain_main_closure - Prevent loading of the user's local package database in the initial stack. + Prevent loading of the user's local package database in the + initial stack. @@ -457,10 +459,10 @@ _ZCMain_main_closure - Start with an empty initial package database stack. This option - is equivalent to the combination of - -no-global-package-db and - -no-user-package-db. + Reset the current package database stack. This option removes + every previously specified package database (including those + read from the GHC_PACKAGE_PATH environment + variable) from the package database stack. @@ -508,7 +510,7 @@ _ZCMain_main_closure packages. If GHC_PACKAGE_PATH ends in a separator, then - the initial package database stack (by default, the user and global + the default package database stack (i.e. the user and global package databases, in that order) is appended. For example, to augment the usual set of packages with a database of your own, you could say (on Unix): -- cgit v1.2.1