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

Version on this page:0.2.3@rev:2
LTS Haskell 19.13:0.2.7
Stackage Nightly 2022-07-01:0.2.7
Latest on Hackage:0.2.7

See all snapshots cabal-file-th appears in

BSD-3-Clause licensed by Nick Partridge
Maintained by
This version can be pinned in stack with:cabal-file-th-0.2.3@sha256:3e08c13c9aa652cfc20dd0e2d032cd0cc12ed33c6d32220abc32ee428f61a3d6,1158

Module documentation for 0.2.3


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