cabal-file-th

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

http://github.com/nkpart/cabal-file-th

LTS Haskell 20.26:0.2.7
Stackage Nightly 2022-11-17: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 [email protected]
This version can be pinned in stack with:cabal-file-th-0.2.7@sha256:a84fddcf719cbea2314d853090fdd4129e26aa4fde7c210db70ed6362ba7f741,1157

Module documentation for 0.2.7

cabal-file-th

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

Usage

import qualified Distribution.PackageDescription.TH as P

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

Install

$ cabal install cabal-file-th