summaryrefslogtreecommitdiff
path: root/utils/hpc
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-11-23 17:07:05 +0000
committerIan Lynagh <ian@well-typed.com>2012-11-23 17:07:05 +0000
commitb610a84d089f0ef5d5b1c0250884bce9d0d28ad8 (patch)
tree58da97ebcb136cf4e9f1447c6662452967b37cc1 /utils/hpc
parent9ef4d48e296d4b96492a839f9ee569f8f90c617b (diff)
downloadhaskell-b610a84d089f0ef5d5b1c0250884bce9d0d28ad8.tar.gz
"hpc version" now shows the version number from the .cabal file
Diffstat (limited to 'utils/hpc')
-rw-r--r--utils/hpc/Main.hs6
-rw-r--r--utils/hpc/hpc-bin.cabal1
2 files changed, 5 insertions, 2 deletions
diff --git a/utils/hpc/Main.hs b/utils/hpc/Main.hs
index 419a519a59..cb1eec6778 100644
--- a/utils/hpc/Main.hs
+++ b/utils/hpc/Main.hs
@@ -1,17 +1,19 @@
-- (c) 2007 Andy Gill
-- Main driver for Hpc
-import HpcFlags
+import Data.Version
import System.Environment
import System.Exit
import System.Console.GetOpt
+import HpcFlags
import HpcReport
import HpcMarkup
import HpcCombine
import HpcShowTix
import HpcDraft
import HpcOverlay
+import Paths_hpc_bin
helpList :: IO ()
helpList =
@@ -132,7 +134,7 @@ version_plugin = Plugin { name = "version"
}
version_main :: Flags -> [String] -> IO ()
-version_main _ _ = putStrLn $ "hpc tools, version 0.6"
+version_main _ _ = putStrLn ("hpc tools, version " ++ showVersion version)
------------------------------------------------------------------------------
diff --git a/utils/hpc/hpc-bin.cabal b/utils/hpc/hpc-bin.cabal
index 30b96211e9..76bac31c05 100644
--- a/utils/hpc/hpc-bin.cabal
+++ b/utils/hpc/hpc-bin.cabal
@@ -31,6 +31,7 @@ Executable hpc
HpcReport
HpcShowTix
HpcUtils
+ Paths_hpc_bin
if flag(base4)
Build-Depends: base >= 4 && < 5