2

Is there a simple way of getting the version of the current package? I want to add a line like this at the beginning of main

putStrLn $ "MyFabApp, version " ++ show(version)

where version :: Data.Version

Don Stewart
  • 137,316
  • 36
  • 365
  • 468
Rob Agar
  • 12,337
  • 5
  • 48
  • 63
  • possible duplicate of [How can my-program.hs get its version number from my-program.cabal at build time?](http://stackoverflow.com/questions/2892586/how-can-my-program-hs-get-its-version-number-from-my-program-cabal-at-build-time) – Don Stewart May 06 '11 at 23:19

1 Answers1

2

You sure can. See this earlier answer:

Community
  • 1
  • 1
Don Stewart
  • 137,316
  • 36
  • 365
  • 468