Template Haskell expressions for reading fields from a project's cabal file.

Version on this page:0.2.4
LTS Haskell 14.27:0.2.6
Stackage Nightly 2019-09-21:0.2.6
Latest on Hackage:0.2.7

See all snapshots cabal-file-th appears in

BSD-3-Clause licensed by Nick Partridge
Maintained by [email protected]

Module documentation for 0.2.4

This version can be pinned in stack with:[email protected]:7670f7befca9a0fb3d104bd2d47851dfdbb7b2ac006681d70d986b55b8ad0b4f,1158


Use template haskell to bring fields from your cabal file into your haskell source files.


import qualified Distribution.PackageDescription.TH as P

myVersion :: String
myVersion = $(packageVariable (pkgVersion . package))


$ cabal install cabal-file-th