[commit: Cabal] master: Added documentation about the auto generated version constant (f08af90)

Ian Lynagh igloo at earth.li
Wed Apr 27 03:23:10 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f08af90e8757767f56a9aa5048e79b95c729db57

>---------------------------------------------------------------

commit f08af90e8757767f56a9aa5048e79b95c729db57
Author: Bas van Dijk <v.dijk.bas at gmail.com>
Date:   Mon Mar 28 22:35:03 2011 +0000

    Added documentation about the auto generated version constant

>---------------------------------------------------------------

 doc/developing-packages.markdown |    8 ++++++++
 doc/index.markdown               |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/doc/developing-packages.markdown b/doc/developing-packages.markdown
index 81bfbc0..2993210 100644
--- a/doc/developing-packages.markdown
+++ b/doc/developing-packages.markdown
@@ -1208,6 +1208,13 @@ in your package.
 The `Paths_`_pkgname_ module is not platform independent so it does not
 get included in the source tarballs generated by `sdist`.
 
+### Accessing the package version ###
+
+The aforementioned auto generated `Paths_`_pkgname_ module also
+exports the constant `version ::` [Version][data-version] which is
+defined as the version of your package as specified in the `version`
+field.
+
 ## System-dependent parameters ##
 
 For some packages, especially those interfacing with C libraries,
@@ -1427,6 +1434,7 @@ a few options:
 [dist-license]: ../libraries/Cabal/Distribution-License.html#t:License
 [extension]:    ../libraries/Cabal/Language-Haskell-Extension.html#t:Extension
 [BuildType]:    ../libraries/Cabal/Distribution-PackageDescription.html#t:BuildType
+[data-version]: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-Version.html
 [alex]:       http://www.haskell.org/alex/
 [autoconf]:   http://www.gnu.org/software/autoconf/
 [c2hs]:       http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
diff --git a/doc/index.markdown b/doc/index.markdown
index e31f0f2..ad3eba9 100644
--- a/doc/index.markdown
+++ b/doc/index.markdown
@@ -27,6 +27,7 @@ builders and users to work with Cabal packages.
           + [Configurations](developing-packages.html#configurations)
           + [Source Repositories](developing-packages.html#source-repositories)
       - [Accessing data files from package code](developing-packages.html#accessing-data-files-from-package-code)
+          + [Accessing the package version](developing-packages.html#accessing-the-package-version)
       - [System-dependent parameters](developing-packages.html#system-dependent-parameters)
       - [Conditional compilation](developing-packages.html#conditional-compilation)
       - [More complex packages](developing-packages.html#more-complex-packages)





More information about the Cvs-libraries mailing list