Template haskell function to bring cabal file fields into your source.
Haskell
Pull request Compare This branch is 4 commits behind nkpart:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Distribution/PackageDescription
test
.gitignore
LICENSE
README.md
Setup.hs
cabal-file-th.cabal

README.md

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