X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fpackages.xml;h=0a8412bbd2fe67a3c6a94fe7258d83c48dbf10df;hb=1bf40a4b38180b8b1c1bdaf4919bc327d5b27abe;hp=c973f478e4316fd5cbfc06b3ad8fcca093a625c6;hpb=cfdf2515dd5b491f8229d44b98fa33adeeac7e60;p=ghc-hetmet.git
diff --git a/docs/users_guide/packages.xml b/docs/users_guide/packages.xml
index c973f47..0a8412b 100644
--- a/docs/users_guide/packages.xml
+++ b/docs/users_guide/packages.xml
@@ -4,7 +4,7 @@
Packages
packages
-
+
A package is a library of Haskell modules known to the
compiler. GHC comes with several packages: see the accompanying
library
@@ -32,7 +32,7 @@ Packages
packagesusing
-
+
GHC only knows about packages that are
installed. To see which packages are installed, use
the ghc-pkg list command:
@@ -103,7 +103,7 @@ $ ghc-pkg list
To see which modules are provided by a package use the
ghc-pkg command (see ):
-
+
$ ghc-pkg field network exposed-modules
exposed-modules: Network.BSD,
@@ -117,62 +117,62 @@ exposed-modules: Network.BSD,
-
-
-
-
-
- This option causes the installed
- package P to be exposed. The
- package P can be specified in
- full with its version number
- (e.g. network-1.0) or the version
- number can be omitted if there is only one version of the
- package installed. If there are multiple versions
- of P installed, then all other
- versions will become hidden.
-
- The
- option also causes package P to
- be linked into the resulting executable or shared
- object. Whether a packages' library is linked statically
- or dynamically is controlled by the flag
- pair /.
-
- In mode
- and mode (see
- ), the compiler normally
- determines which packages are required by the current
- Haskell modules, and links only those. In batch mode
- however, the dependency information isn't available, and
- explicit
- options must be given when linking. The one other time you might need to use
- to force linking a package is
- when the package does not contain any Haskell modules (it
- might contain a C library only, for example). In that
- case, GHC will never discover a dependency on it, so it
- has to be mentioned explicitly.
-
- For example, to link a program consisting of objects
- Foo.o and Main.o, where
- we made use of the network package, we need to
- give GHC the -package flag thus:
+
+
+
+
+
+ This option causes the installed
+ package P to be exposed. The
+ package P can be specified in
+ full with its version number
+ (e.g. network-1.0) or the version
+ number can be omitted if there is only one version of the
+ package installed. If there are multiple versions
+ of P installed, then all other
+ versions will become hidden.
+
+ The
+ option also causes package P to
+ be linked into the resulting executable or shared
+ object. Whether a packages' library is linked statically
+ or dynamically is controlled by the flag
+ pair /.
+
+ In mode
+ and mode (see
+ ), the compiler normally
+ determines which packages are required by the current
+ Haskell modules, and links only those. In batch mode
+ however, the dependency information isn't available, and
+ explicit
+ options must be given when linking. The one other time you might need to use
+ to force linking a package is
+ when the package does not contain any Haskell modules (it
+ might contain a C library only, for example). In that
+ case, GHC will never discover a dependency on it, so it
+ has to be mentioned explicitly.
+
+ For example, to link a program consisting of objects
+ Foo.o and Main.o, where
+ we made use of the network package, we need to
+ give GHC the -package flag thus:
$ ghc -o myprog Foo.o Main.o -package network
- The same flag is necessary even if we compiled the modules from
- source, because GHC still reckons it's in batch mode:
+ The same flag is necessary even if we compiled the modules from
+ source, because GHC still reckons it's in batch mode:
$ ghc -o myprog Foo.hs Main.hs -package network
-
+
-
+
-
-
-
-
+
+
+
+
Exposes a package like , but the
package is named by its ID rather than by name. This is a
@@ -184,75 +184,86 @@ exposed-modules: Network.BSD,
-
-
-
-
- Ignore the exposed flag on installed packages, and hide them
- all by default. If you use
- this flag, then any packages you require (including
- base) need to be explicitly exposed using
- options.
-
- This is a good way to insulate your program from
- differences in the globally exposed packages, and being
- explicit about package dependencies is a Good Thing.
- Cabal always passes the
- flag to GHC, for
- exactly this reason.
-
+
+
+
+
+ Ignore the exposed flag on installed packages, and hide them
+ all by default. If you use
+ this flag, then any packages you require (including
+ base) need to be explicitly exposed using
+ options.
+
+ This is a good way to insulate your program from
+ differences in the globally exposed packages, and being
+ explicit about package dependencies is a Good Thing.
+ Cabal always passes the
+ flag to GHC, for
+ exactly this reason.
+
- P
-
-
-
- This option does the opposite of : it
- causes the specified package to be hidden,
- which means that none of its modules will be available for import
- by Haskell import directives.
-
- Note that the package might still end up being linked into the
- final program, if it is a dependency (direct or indirect) of
- another exposed package.
-
+ P
+
+
+
+ This option does the opposite of : it
+ causes the specified package to be hidden,
+ which means that none of its modules will be available for import
+ by Haskell import directives.
+
+ Note that the package might still end up being linked into the
+ final program, if it is a dependency (direct or indirect) of
+ another exposed package.
+
- P
-
-
-
- Causes the compiler to behave as if package
- P, and any packages that depend on
- P, are not installed at all.
-
- Saying -ignore-package P is the same as
- giving -hide-package flags for
- P and all the packages that depend on
- P. Sometimes we don't know ahead of time which
- packages will be installed that depend on P,
- which is when the -ignore-package flag can be
- useful.
-
+ P
+
+
+
+ Causes the compiler to behave as if package
+ P, and any packages that depend on
+ P, are not installed at all.
+
+ Saying -ignore-package P is the same as
+ giving -hide-package flags for
+ P and all the packages that depend on
+ P. Sometimes we don't know ahead of time which
+ packages will be installed that depend on P,
+ which is when the -ignore-package flag can be
+ useful.
+
- foo
-
-
-
- Tells GHC the the module being compiled forms part of
- package foo.
- If this flag is omitted (a very common case) then the
- default package main is assumed.
+
+
+
+
+ By default, GHC will automatically link in the
+ haskell98 package. This flag disables that
+ behaviour.
+
+
+
+
+ foo
+
+
+
+ Tells GHC the the module being compiled forms part of
+ package foo.
+ If this flag is omitted (a very common case) then the
+ default package main is assumed.Note: the argument to
should be the full
package name-version for the package.
For example:
-package mypkg-1.2.
-
+
@@ -260,15 +271,14 @@ exposed-modules: Network.BSD,
The main package
- Every complete Haskell program must define main in
- module Main
+ Every complete Haskell program must define main in
+ module Main
in package main. (Omitting the flag compiles
code for package main.) Failure to do so leads to a somewhat obscure
link-time error of the form:
/usr/bin/ld: Undefined symbols:
_ZCMain_main_closure
-___stginit_ZCMain
@@ -304,7 +314,7 @@ ___stginit_ZCMain
Package Databases
-
+
A package database is where the details about installed packages
are stored. It is a directory, usually
@@ -323,56 +333,56 @@ ___stginit_ZCMain
- The global package database, which comes with your GHC
- installation,
- e.g. /usr/lib/ghc-6.12.1/package.conf.d.
+ The global package database, which comes with your GHC
+ installation,
+ e.g. /usr/lib/ghc-6.12.1/package.conf.d.
- A package database private to each user. On Unix
- systems this will be
- $HOME/.ghc/arch-os-version/package.conf.d, and on
- Windows it will be something like
- C:\Documents And Settings\user\ghc\package.conf.d.
- The ghc-pkg tool knows where this file should be
- located, and will create it if it doesn't exist (see ).
+ A package database private to each user. On Unix
+ systems this will be
+ $HOME/.ghc/arch-os-version/package.conf.d, and on
+ Windows it will be something like
+ C:\Documents And Settings\user\ghc\package.conf.d.
+ The ghc-pkg tool knows where this file should be
+ located, and will create it if it doesn't exist (see ).When GHC starts up, it reads the contents of these two package
databases, and builds up a list of the packages it knows about. You can
see GHC's package table by running GHC with the
- flag.
+ flag.Package databases may overlap: for example, packages in the
user database will override (shadow) those
of the same name and version in the global database.You can control the loading of package databases using the following
- GHC options:
+ GHC options:
-
-
-
-
-
- Read in the package configuration file
- file in addition to the system
- default file and the user's local file. Packages in additional
- files read this way will override those in the global and user
- databases.
-
+
+
+
+
+
+ Read in the package configuration file
+ file in addition to the system
+ default file and the user's local file. Packages in additional
+ files read this way will override those in the global and user
+ databases.
+
-
-
-
-
-
- Prevent loading of the user's local package database.
-
+
+
+
+
+
+ Prevent loading of the user's local package database.
+
@@ -382,27 +392,27 @@ ___stginit_ZCMain
GHC_PACKAGE_PATHThe GHC_PACKAGE_PATH environment variable may be
- set to a :-separated (;-separated
- on Windows) list of files containing package databases. This list of
- package databases is used by GHC and ghc-pkg, with earlier databases in
- the list overriding later ones. This order was chosen to match the
- behaviour of the PATH environment variable; think of
- it as a list of package databases that are searched left-to-right for
- packages.
+ set to a :-separated (;-separated
+ on Windows) list of files containing package databases. This list of
+ package databases is used by GHC and ghc-pkg, with earlier databases in
+ the list overriding later ones. This order was chosen to match the
+ behaviour of the PATH environment variable; think of
+ it as a list of package databases that are searched left-to-right for
+ packages.If GHC_PACKAGE_PATH ends in a separator, then
- the default user and system package databases are appended, in that
- order. e.g. to augment the usual set of packages with a database of
- your own, you could say (on Unix):
+ the default user and system package databases are appended, in that
+ order. e.g. to augment the usual set of packages with a database of
+ your own, you could say (on Unix):
$ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:
- (use ; instead of : on
- Windows).
+ (use ; instead of : on
+ Windows).
To check whether your GHC_PACKAGE_PATH setting
- is doing the right thing, ghc-pkg list will list all
- the databases in use, in the reverse order they are searched.
-
+ is doing the right thing, ghc-pkg list will list all
+ the databases in use, in the reverse order they are searched.
+
@@ -452,7 +462,7 @@ depends: array-0.2.0.1-9cbf76a576b6ee9c1f880cf171a0928d
The purpose of the package ID is to detect problems caused by
re-installing a package without also recompiling the packages
that depend on it. Recompiling dependencies is necessary,
- because the newly compiled package may have a differnt ABI
+ because the newly compiled package may have a different ABI
(Application Binary Interface) than the previous version, even
if both packages were built from the same source code using the
same compiler. With package IDs, a recompiled
@@ -528,16 +538,16 @@ haskell98-1.0.1.0
Package management (the ghc-pkg command)packagesmanagement
-
+
The ghc-pkg tool is for querying and
modifying package databases. To see what package databases are
in use, use
ghc-pkg list. The stack of databases that
ghc-pkg knows about can be modified using the
GHC_PACKAGE_PATH environment variable (see , and using
- --package-conf options on the
- ghc-pkg command line.
+ linkend="ghc-package-path" />, and using
+ --package-conf options on the
+ ghc-pkg command line.
When asked to modify a database, ghc-pkg modifies
the global database by default. Specifying
@@ -564,7 +574,7 @@ haskell98-1.0.1.0
The ghc-pkg program may be run in the ways listed
below. Where a package name is required, the package can be named in
- full including the version number
+ full including the version number
(e.g. network-1.0), or without the version number.
Naming a package without the version number matches all versions of the
package; the specified action will be applied to all the matching
@@ -583,47 +593,47 @@ haskell98-1.0.1.0
- ghc-pkg register file
-
- Reads a package specification from
- file (which may be “-”
- to indicate standard input),
- and adds it to the database of installed packages. The syntax of
- file is given in .
-
- The package specification must be a package that isn't already
- installed.
-
+ ghc-pkg register file
+
+ Reads a package specification from
+ file (which may be “-”
+ to indicate standard input),
+ and adds it to the database of installed packages. The syntax of
+ file is given in .
+
+ The package specification must be a package that isn't already
+ installed.
+
- ghc-pkg update file
-
- The same as register, except that if a
- package of the same name is already installed, it is
- replaced by the new one.
-
+ ghc-pkg update file
+
+ The same as register, except that if a
+ package of the same name is already installed, it is
+ replaced by the new one.
+
- ghc-pkg unregister P
-
- Remove the specified package from the database.
-
+ ghc-pkg unregister P
+
+ Remove the specified package from the database.
+
- ghc-pkg expose P
-
- Sets the exposed flag for package
- P to True.
-
+ ghc-pkg expose P
+
+ Sets the exposed flag for package
+ P to True.
+
- ghc-pkg check
-
+ ghc-pkg check
+ Check consistency of dependencies in the package
database, and report packages that have missing
dependencies.
@@ -631,42 +641,42 @@ haskell98-1.0.1.0
- ghc-pkg hide P
-
- Sets the exposed flag for package
- P to False.
-
+ ghc-pkg hide P
+
+ Sets the exposed flag for package
+ P to False.
+
- ghc-pkg list [P] []
-
- This option displays the currently installed
- packages, for each of the databases known to
- ghc-pkg. That includes the global database, the
- user's local database, and any further files specified using the
- option on the command line.
-
- Hidden packages (those for which the exposed
- flag is False) are shown in parentheses in the
- list of packages.
-
- If an optional package identifier P
- is given, then only packages matching that identifier are
- shown.
-
- If the option is given, then
- the packages are listed on a single line separated by spaces, and
- the database names are not included. This is intended to make it
- easier to parse the output of ghc-pkg list using
- a script.
-
+ ghc-pkg list [P] []
+
+ This option displays the currently installed
+ packages, for each of the databases known to
+ ghc-pkg. That includes the global database, the
+ user's local database, and any further files specified using the
+ option on the command line.
+
+ Hidden packages (those for which the exposed
+ flag is False) are shown in parentheses in the
+ list of packages.
+
+ If an optional package identifier P
+ is given, then only packages matching that identifier are
+ shown.
+
+ If the option is given, then
+ the packages are listed on a single line separated by spaces, and
+ the database names are not included. This is intended to make it
+ easier to parse the output of ghc-pkg list using
+ a script.
+
- ghc-pkg find-module M []
-
- This option lists registered packages exposing module
+ ghc-pkg find-module M []
+
+ This option lists registered packages exposing module
M. Examples:
$ ghc-pkg find-module Var
@@ -679,40 +689,40 @@ c:/fptools/validate/ghc/driver/package.conf.inplace:
Otherwise, it behaves like ghc-pkg list,
including options.
-
+
- ghc-pkg latest P
-
- Prints the latest available version of package
- P.
-
+ ghc-pkg latest P
+
+ Prints the latest available version of package
+ P.
+
- ghc-pkg describe P
-
- Emit the full description of the specified package. The
- description is in the form of an
- InstalledPackageInfo, the same as the input file
- format for ghc-pkg register. See for details.
+ ghc-pkg describe P
+
+ Emit the full description of the specified package. The
+ description is in the form of an
+ InstalledPackageInfo, the same as the input file
+ format for ghc-pkg register. See for details.If the pattern matches multiple packages, the
description for each package is emitted, separated by the
string --- on a line by itself.
-
+
- ghc-pkg field Pfield[,field]*
-
- Show just a single field of the installed package description
- for P. Multiple fields can be selected by separating
+ ghc-pkg field Pfield[,field]*
+
+ Show just a single field of the installed package description
+ for P. Multiple fields can be selected by separating
them with commas
-
+
@@ -755,7 +765,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
become out-of-sync with the contents of the database
(ghc-pkg will warn you if this might be
the case).
-
+
The other time when ghc-pkg recache is
useful is for registering packages manually: it is
@@ -801,110 +811,110 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
-
-
-
-
-
- Automatically generate the GHCi
- .o version of each
- .a Haskell library, using GNU ld (if
- that is available). Without this option,
- ghc-pkg will warn if GHCi versions of
- any Haskell libraries in the package don't exist.
-
- GHCi .o libraries don't
- necessarily have to live in the same directory as the
- corresponding .a library. However,
- this option will cause the GHCi library to be created in
- the same directory as the .a
- library.
-
+
+
+
+
+
+ Automatically generate the GHCi
+ .o version of each
+ .a Haskell library, using GNU ld (if
+ that is available). Without this option,
+ ghc-pkg will warn if GHCi versions of
+ any Haskell libraries in the package don't exist.
+
+ GHCi .o libraries don't
+ necessarily have to live in the same directory as the
+ corresponding .a library. However,
+ this option will cause the GHCi library to be created in
+ the same directory as the .a
+ library.
+
-
- file
-
-
-
-
- file
-
-
-
-
- Adds file to the stack of package
- databases. Additionally, file will
- also be the database modified by a register,
- unregister, expose or
- hide command, unless it is overridden by a later
- , or
- option.
-
+
+ file
+
+
+
+
+ file
+
+
+
+
+ Adds file to the stack of package
+ databases. Additionally, file will
+ also be the database modified by a register,
+ unregister, expose or
+ hide command, unless it is overridden by a later
+ , or
+ option.
+
-
-
-
-
-
-
-
- Causes ghc-pkg to ignore missing
- dependencies, directories and libraries when registering a package,
- and just go ahead and add it anyway. This might be useful if your
- package installation system needs to add the package to
- GHC before building and installing the files.
-
+
+
+
+
+
+
+
+ Causes ghc-pkg to ignore missing
+ dependencies, directories and libraries when registering a package,
+ and just go ahead and add it anyway. This might be useful if your
+ package installation system needs to add the package to
+ GHC before building and installing the files.
+
-
-
-
-
-
- Operate on the global package database (this is the default).
- This flag affects the register,
- update, unregister,
- expose, and hide
- commands.
-
+
+
+
+
+
+ Operate on the global package database (this is the default).
+ This flag affects the register,
+ update, unregister,
+ expose, and hide
+ commands.
+
-
-
-
-
-
-
-
-
-
- Outputs the command-line syntax.
-
+
+
+
+
+
+
+
+
+
+ Outputs the command-line syntax.
+
-
-
-
-
-
- Operate on the current user's local package database.
- This flag affects the register,
- update, unregister,
- expose, and hide
- commands.
-
+
+
+
+
+
+ Operate on the current user's local package database.
+ This flag affects the register,
+ update, unregister,
+ expose, and hide
+ commands.
+
- nghc-pkg
+ nghc-pkg
option
@@ -917,25 +927,25 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
level 2.
-
+
-
-
-
-
-
-
-
-
-
- Output the ghc-pkg version number.
-
+
+
+
+
+
+
+
+
+
+ Output the ghc-pkg version number.
+
-
+
Building a package from Haskell sourcepackages
@@ -946,7 +956,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
if possible. If your package is particularly complicated or requires a
lot of configuration, then you might have to fall back to the low-level
mechanisms, so a few hints for those brave souls follow.
-
+
You need to build an "installed package info" file for
passing to ghc-pkg when installing your
package. The contents of this file are described in
@@ -963,60 +973,60 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
indirection).Building a static library is done by using the
- ar tool, like so:
+ ar tool, like so:
ar cqs libHSfoo-1.0.a A.o B.o C.o ...
- where A.o,
- B.o and so on are the compiled Haskell
- modules, and libHSfoo.a is the library you
- wish to create. The syntax may differ slightly on your system,
- so check the documentation if you run into difficulties.
+ where A.o,
+ B.o and so on are the compiled Haskell
+ modules, and libHSfoo.a is the library you
+ wish to create. The syntax may differ slightly on your system,
+ so check the documentation if you run into difficulties.
- Versions of the Haskell libraries for use with GHCi may also
- abe included: GHCi cannot load .a files
- directly, instead it will look for an object file
- called HSfoo.o and load that. On some
- systems, the ghc-pkg tool can automatically
- build the GHCi version of each library, see
- . To build these libraries
- by hand from the .a archive, it is possible
- to use GNU ld as follows:
+ Versions of the Haskell libraries for use with GHCi may also
+ be included: GHCi cannot load .a files
+ directly, instead it will look for an object file
+ called HSfoo.o and load that. On some
+ systems, the ghc-pkg tool can automatically
+ build the GHCi version of each library, see
+ . To build these libraries
+ by hand from the .a archive, it is possible
+ to use GNU ld as follows:ld -r ––whole-archive -o HSfoo.o libHSfoo.a
- (replace
- ––whole-archive with
- –all_load on MacOS X)
+ (replace
+ ––whole-archive with
+ –all_load on MacOS X)
- When building the package as shared library, GHC can be used to
- perform the link step. This hides some of the details
- out the underlying linker and provides a common
- interface to all shared object variants that are supported
- by GHC (DLLs, ELF DSOs, and Mac OS dylibs). The shared
- object must be named in specific way for two reasons: (1)
- the name must contain the GHC compiler version, so that two
- library variants don't collide that are compiled by
- different versions of GHC and that therefore are most likely
- incompatible with respect to calling conventions, (2) it
- must be different from the static name otherwise we would
- not be able to control the linker as precisely as necessary
- to make
- the / flags
- work, see .
+ When building the package as shared library, GHC can be used to
+ perform the link step. This hides some of the details
+ out the underlying linker and provides a common
+ interface to all shared object variants that are supported
+ by GHC (DLLs, ELF DSOs, and Mac OS dylibs). The shared
+ object must be named in specific way for two reasons: (1)
+ the name must contain the GHC compiler version, so that two
+ library variants don't collide that are compiled by
+ different versions of GHC and that therefore are most likely
+ incompatible with respect to calling conventions, (2) it
+ must be different from the static name otherwise we would
+ not be able to control the linker as precisely as necessary
+ to make
+ the / flags
+ work, see .ghc -shared libHSfoo-1.0-ghcGHCVersion.so A.o B.o C.o
- Using GHC's version number in the shared object name
- allows different library versions compiled by different GHC
- versions to be installed in standard system locations,
- e.g. under *nix /usr/lib. To obtain the version number of
- GHC invoke ghc --numeric-version and use
- its output in place
- of GHCVersion. See also
- on how object files must
- be prepared for shared object linking.
+ Using GHC's version number in the shared object name
+ allows different library versions compiled by different GHC
+ versions to be installed in standard system locations,
+ e.g. under *nix /usr/lib. To obtain the version number of
+ GHC invoke ghc --numeric-version and use
+ its output in place
+ of GHCVersion. See also
+ on how object files must
+ be prepared for shared object linking.
@@ -1044,7 +1054,7 @@ ghc-pkg dot | tred | dot -Tpdf >pkgs.pdf
A package specification is a Haskell record; in particular, it is the
record InstalledPackageInfo in the module Distribution.InstalledPackageInfo, which is part of the Cabal package distributed with GHC.
+ url="&libraryCabalLocation;/Distribution-InstalledPackageInfo.html#%tInstalledPackageInfo">InstalledPackageInfo in the module Distribution.InstalledPackageInfo, which is part of the Cabal package distributed with GHC.
An InstalledPackageInfo has a human
readable/writable syntax. The functions
@@ -1112,25 +1122,25 @@ haddock-html: /usr/share/doc/ghc/html/libraries/unix
- freeform
-
- Any arbitrary string, no interpretation or parsing is
- done.
-
+ freeform
+
+ Any arbitrary string, no interpretation or parsing is
+ done.
+
- string
-
- A sequence of non-space characters, or a sequence of arbitrary
- characters surrounded by quotes "....".
-
+ string
+
+ A sequence of non-space characters, or a sequence of arbitrary
+ characters surrounded by quotes "....".
+
- string list
-
- A sequence of strings, separated by commas. The sequence may
- be empty.
-
+ string list
+
+ A sequence of strings, separated by commas. The sequence may
+ be empty.
+
@@ -1138,420 +1148,420 @@ haddock-html: /usr/share/doc/ghc/html/libraries/unix
names, version, dependencies).The allowed fields, with their types, are:
-
+
-
- name
- namepackage specification
-
-
- The package's name (without the version).
-
+
+ name
+ namepackage specification
+
+
+ The package's name (without the version).
+
-
+
-
- id
- idpackage specification
-
-
- The package ID. It is up to you to choose a suitable
- one.
-
+
+ id
+ idpackage specification
+
+
+ The package ID. It is up to you to choose a suitable
+ one.
+
-
+
-
- version
- versionpackage specification
-
-
- The package's version, usually in the form
- A.B (any number of components are allowed).
-
+
+ version
+ versionpackage specification
+
+
+ The package's version, usually in the form
+ A.B (any number of components are allowed).
+
-
+
-
- license
- autopackage specification
-
-
- (string) The type of license under which this package is distributed.
- This field is a value of the License type.
-
+
+ license
+ autopackage specification
+
+
+ (string) The type of license under which this package is distributed.
+ This field is a value of the License type.
+
-
-
+
+ license-filelicense-filepackage specification
-
- (optional string) The name of a file giving detailed license
- information for this package.
-
-
-
-
-
+
+ (optional string) The name of a file giving detailed license
+ information for this package.
+
+
+
+
+ copyrightcopyrightpackage specification
-
- (optional freeform) The copyright string.
-
-
+
+ (optional freeform) The copyright string.
+
+
-
-
+
+ maintainermaintainerpackage specification
-
- (optinoal freeform) The email address of the package's maintainer.
-
-
+
+ (optional freeform) The email address of the package's maintainer.
+
+
-
-
+
+ stabilitystabilitypackage specification
-
- (optional freeform) A string describing the stability of the package
- (eg. stable, provisional or experimental).
-
-
-
-
-
+
+ (optional freeform) A string describing the stability of the package
+ (eg. stable, provisional or experimental).
+
+
+
+
+ homepagehomepagepackage specification
-
- (optional freeform) URL of the package's home page.
-
-
+
+ (optional freeform) URL of the package's home page.
+
+
-
+ package-urlpackage-urlpackage specification
-
- (optional freeform) URL of a downloadable distribution for this
- package. The distribution should be a Cabal package.
-
-
-
-
-
+
+ (optional freeform) URL of a downloadable distribution for this
+ package. The distribution should be a Cabal package.
+
+
+
+
+ descriptiondescriptionpackage specification
-
- (optional freeform) Description of the package.
-
-
+
+ (optional freeform) Description of the package.
+
+
-
+ categorycategorypackage specification
-
- (optinoal freeform) Which category the package belongs to. This field
- is for use in conjunction with a future centralised package
- distribution framework, tentatively titled Hackage.
-
-
-
-
-
+
+ (optional freeform) Which category the package belongs to. This field
+ is for use in conjunction with a future centralised package
+ distribution framework, tentatively titled Hackage.
+
+
+
+
+ authorauthorpackage specification
-
- (optional freeform) Author of the package.
-
-
+
+ (optional freeform) Author of the package.
+
+
-
-
+
+ exposedexposedpackage specification
-
- (bool) Whether the package is exposed or not.
-
-
+
+ (bool) Whether the package is exposed or not.
+
+
-
-
+
+ exposed-modulesexposed-modulespackage specification
-
- (string list) modules exposed by this package.
-
-
+
+ (string list) modules exposed by this package.
+
+
-
-
+
+ hidden-moduleshidden-modulespackage specification
-
- (string list) modules provided by this package,
- but not exposed to the programmer. These modules cannot be
- imported, but they are still subject to the overlapping constraint:
- no other package in the same program may provide a module of the
- same name.
-
-
-
-
-
+
+ (string list) modules provided by this package,
+ but not exposed to the programmer. These modules cannot be
+ imported, but they are still subject to the overlapping constraint:
+ no other package in the same program may provide a module of the
+ same name.
+
+
+
+
+ import-dirsimport-dirspackage specification
-
- (string list) A list of directories containing interface files
- (.hi files) for this package.
-
- If the package contains profiling libraries, then
- the interface files for those library modules should have
- the suffix .p_hi. So the package can
- contain both normal and profiling versions of the same
- library without conflict (see also
- library_dirs below).
-
-
-
-
-
+
+ (string list) A list of directories containing interface files
+ (.hi files) for this package.
+
+ If the package contains profiling libraries, then
+ the interface files for those library modules should have
+ the suffix .p_hi. So the package can
+ contain both normal and profiling versions of the same
+ library without conflict (see also
+ library_dirs below).
+
+
+
+
+ library-dirslibrary-dirspackage specification
-
- (string list) A list of directories containing libraries for this
- package.
-
-
-
-
-
+
+ (string list) A list of directories containing libraries for this
+ package.
+
+
+
+
+ hs-librarieshs-librariespackage specification
-
- (string list) A list of libraries containing Haskell code for this
- package, with the .a or
- .dll suffix omitted. When packages are
- built as libraries, the
- lib prefix is also omitted.
-
- For use with GHCi, each library should have an
- object file too. The name of the object file does
- not have a lib
- prefix, and has the normal object suffix for your
- platform.
-
- For example, if we specify a Haskell library as
- HSfoo in the package spec, then the
- various flavours of library that GHC actually uses will be
- called:
-
-
- libHSfoo.a
-
- The name of the library on Unix and Windows
- (mingw) systems. Note that we don't support
- building dynamic libraries of Haskell code on Unix
- systems.
-
-
-
- HSfoo.dll
-
- The name of the dynamic library on Windows
- systems (optional).
-
-
-
- HSfoo.o
- HSfoo.obj
-
- The object version of the library used by
- GHCi.
-
-
-
-
-
-
-
-
+
+ (string list) A list of libraries containing Haskell code for this
+ package, with the .a or
+ .dll suffix omitted. When packages are
+ built as libraries, the
+ lib prefix is also omitted.
+
+ For use with GHCi, each library should have an
+ object file too. The name of the object file does
+ not have a lib
+ prefix, and has the normal object suffix for your
+ platform.
+
+ For example, if we specify a Haskell library as
+ HSfoo in the package spec, then the
+ various flavours of library that GHC actually uses will be
+ called:
+
+
+ libHSfoo.a
+
+ The name of the library on Unix and Windows
+ (mingw) systems. Note that we don't support
+ building dynamic libraries of Haskell code on Unix
+ systems.
+
+
+
+ HSfoo.dll
+
+ The name of the dynamic library on Windows
+ systems (optional).
+
+
+
+ HSfoo.o
+ HSfoo.obj
+
+ The object version of the library used by
+ GHCi.
+
+
+
+
+
+
+
+ extra-librariesextra-librariespackage specification
-
- (string list) A list of extra libraries for this package. The
- difference between hs-libraries and
- extra-libraries is that
- hs-libraries normally have several
- versions, to support profiling, parallel and other build
- options. The various versions are given different
- suffixes to distinguish them, for example the profiling
- version of the standard prelude library is named
- libHSbase_p.a, with the
- _p indicating that this is a profiling
- version. The suffix is added automatically by GHC for
- hs-libraries only, no suffix is added
- for libraries in
- extra-libraries.
-
- The libraries listed in
- extra-libraries may be any libraries
- supported by your system's linker, including dynamic
- libraries (.so on Unix,
- .DLL on Windows).
-
- Also, extra-libraries are placed
- on the linker command line after the
- hs-libraries for the same package. If
- your package has dependencies in the other direction (i.e.
- extra-libraries depends on
- hs-libraries), and the libraries are
- static, you might need to make two separate
- packages.
-
-
-
-
-
+
+ (string list) A list of extra libraries for this package. The
+ difference between hs-libraries and
+ extra-libraries is that
+ hs-libraries normally have several
+ versions, to support profiling, parallel and other build
+ options. The various versions are given different
+ suffixes to distinguish them, for example the profiling
+ version of the standard prelude library is named
+ libHSbase_p.a, with the
+ _p indicating that this is a profiling
+ version. The suffix is added automatically by GHC for
+ hs-libraries only, no suffix is added
+ for libraries in
+ extra-libraries.
+
+ The libraries listed in
+ extra-libraries may be any libraries
+ supported by your system's linker, including dynamic
+ libraries (.so on Unix,
+ .DLL on Windows).
+
+ Also, extra-libraries are placed
+ on the linker command line after the
+ hs-libraries for the same package. If
+ your package has dependencies in the other direction (i.e.
+ extra-libraries depends on
+ hs-libraries), and the libraries are
+ static, you might need to make two separate
+ packages.
+
+
+
+
+ include-dirsinclude-dirspackage specification
-
- (string list) A list of directories containing C includes for this
- package.
-
-
-
-
-
+
+ (string list) A list of directories containing C includes for this
+ package.
+
+
+
+
+ includesincludespackage specification
-
- (string list) A list of files to include for via-C compilations
- using this package. Typically the include file(s) will
- contain function prototypes for any C functions used in
- the package, in case they end up being called as a result
- of Haskell functions from the package being
- inlined.
-
-
-
-
-
+
+ (string list) A list of files to include for via-C compilations
+ using this package. Typically the include file(s) will
+ contain function prototypes for any C functions used in
+ the package, in case they end up being called as a result
+ of Haskell functions from the package being
+ inlined.
+
+
+
+
+ dependsdependspackage specification
-
- (package id list) Packages on which this package
- depends.
-
-
-
-
-
+
+ (package id list) Packages on which this package
+ depends.
+
+
+
+
+ hugs-optionshugs-optionspackage specification
-
- (string list) Options to pass to Hugs for this package.
-
-
+
+ (string list) Options to pass to Hugs for this package.
+
+
-
-
+
+ cc-optionscc-optionspackage specification
-
- (string list) Extra arguments to be added to the gcc command line
- when this package is being used (only for via-C
- compilations).
-
-
-
-
-
+
+ (string list) Extra arguments to be added to the gcc command line
+ when this package is being used (only for via-C
+ compilations).
+
+
+
+
+ ld-optionsld-optionspackage specification
-
- (string list) Extra arguments to be added to the
- gcc command line (for linking) when
- this package is being used.
-
-
-
-
-
+
+ (string list) Extra arguments to be added to the
+ gcc command line (for linking) when
+ this package is being used.
+
+
+
+
+ framework-dirsframework-dirspackage specification
-
- (string list) On Darwin/MacOS X, a list of directories containing
- frameworks for this package. This corresponds to the
- option. It is ignored on all other
- platforms.
-
-
-
-
-
+
+ (string list) On Darwin/MacOS X, a list of directories containing
+ frameworks for this package. This corresponds to the
+ option. It is ignored on all other
+ platforms.
+
+
+
+
+ frameworksframeworkspackage specification
-
- (string list) On Darwin/MacOS X, a list of frameworks to link to. This
- corresponds to the option. Take a look
- at Apple's developer documentation to find out what frameworks
- actually are. This entry is ignored on all other platforms.
-
-
-
-
-
+
+ (string list) On Darwin/MacOS X, a list of frameworks to link to. This
+ corresponds to the option. Take a look
+ at Apple's developer documentation to find out what frameworks
+ actually are. This entry is ignored on all other platforms.
+
+
+
+
+ haddock-interfaceshaddock-interfacespackage specification
-
- (string list) A list of filenames containing Haddock interface
- files (.haddock files) for this package.
-
-
-
-
-
+
+ (string list) A list of filenames containing Haddock interface
+ files (.haddock files) for this package.
+
+
+
+
+ haddock-htmlhaddock-htmlpackage specification
-
- (optional string) The directory containing the Haddock-generated HTML
- for this package.
-
-
+
+ (optional string) The directory containing the Haddock-generated HTML
+ for this package.
+
+
-
+