|
|
|
|
|
Description |
Package manipulation
|
|
Synopsis |
|
|
|
Documentation |
|
module PackageConfig |
|
The PackageConfigMap
|
|
|
A PackageConfigMap maps a PackageId to a PackageConfig
|
|
|
|
|
Find the package we know about with the given id (e.g. "foo-1.0"), if any
|
|
|
|
|
Show package info on console, if verbosity is >= 3
|
|
Reading the package config, and processing cmdline args
|
|
|
Package state is all stored in DynFlags, including the details of
all packages, which packages are exposed, and which modules they
provide.
The package state is computed by initPackages, and kept in DynFlags.
- -package pkg>@ causes @<pkg to become exposed, and all other packages
with the same name to become hidden.
- -hide-package pkg>@ causes @<pkg to become hidden.
- Let exposedPackages be the set of packages thus exposed.
Let depExposedPackages be the transitive closure from exposedPackages of
their dependencies.
- When searching for a module from an preload import declaration,
only the exposed modules in exposedPackages are valid.
- When searching for a module from an implicit import, all modules
from depExposedPackages are valid.
- When linking in a compilation manager mode, we link in packages the
program depends on (the compiler knows this list by the
time it gets to the link step). Also, we link in all packages
which were mentioned with preload -package flags on the command-line,
or are a transitive dependency of same, or are "base"/"rts".
The reason for this is that we might need packages which don't
contain any Haskell modules, and therefore won't be discovered
by the normal mechanism of dependency tracking.
| Constructors | |
|
|
|
Call this after DynFlags.parseDynFlags. It reads the package
configuration files, and sets up various internal tables of package
information, according to the package-related flags on the
command-line (-package, -hide-package etc.)
Returns a list of packages to link in if we're doing dynamic linking.
This list contains the packages that the user explicitly mentioned with
-package flags.
initPackages can be called again subsequently after updating the
packageFlags field of the DynFlags, and it will update the
pkgState in DynFlags and return a list of packages to
link in.
|
|
|
Looks up the package with the given id in the package state, panicing if it is
not found
|
|
|
Takes a Module, and if the module is in a package returns
(pkgconf, exposed) where pkgconf is the PackageConfig for that package,
and exposed is True if the package exposes the module.
|
|
Inspecting the set of packages in scope
|
|
|
Find all the include directories in these and the preload packages
|
|
|
Find all the library paths in these and the preload packages
|
|
|
Find all the link options in these and the preload packages
|
|
|
Find all the C-compiler options in these and the preload packages
|
|
|
Find all the package framework paths in these and the preload packages
|
|
|
Find all the package frameworks in these and the preload packages
|
|
|
Find all the PackageConfig in both the preload packages from DynFlags and corresponding to the list of
PackageConfigs
|
|
|
|
|
|
|
|
|
|
Utils
|
|
|
Will the Name come from a dynamically linked library?
|
|
Produced by Haddock version 2.6.1 |