[Haskell-cafe] Synchronising cabal package version with self-reported version

Denis Bueno dbueno at gmail.com
Fri Apr 17 22:38:54 EDT 2009


Hi all,

In a command-line app of mine I want to have a --version flag, like
many GNU apps do to report their version.  The only way I know to
provide the version number is to hardcode it in the source code
somewhere.  That means I have the version number in two places: the
.cabal file and the source code.  I just know that one day they'll get
unsynchronised, and --version will be wrong.

Is there any way to put the version number in _one_ place, and have
both the .cabal and source refer to it?  Or even any easier way to
synchronise both version numbers?

Thanks,
                              Denis


More information about the Haskell-Cafe mailing list