diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-06-05 08:18:30 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-06-05 08:18:30 +0200 |
commit | cbe0f7bc5ddae7f546e525394c8095062e11ef0f (patch) | |
tree | 8bc777fe40c11f2d27829798accbb77391a13026 | |
parent | af54fd00292a943773b0a82c0250e0e25cac4359 (diff) | |
download | stylish-haskell-cbe0f7bc5ddae7f546e525394c8095062e11ef0f.tar.gz |
Figure out or own version
-rw-r--r-- | .ghci | 2 | ||||
-rw-r--r-- | src/Main.hs | 7 | ||||
-rw-r--r-- | stylish-haskell.cabal | 1 |
3 files changed, 8 insertions, 2 deletions
@@ -1 +1 @@ -:set -isrc -itests -idraft +:set -isrc -itests -idist/build/autogen diff --git a/src/Main.hs b/src/Main.hs index 93bec4d..02027ab 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -6,11 +6,14 @@ module Main -------------------------------------------------------------------------------- +import Data.List (intercalate) import Data.Maybe (listToMaybe) +import Data.Version (Version(..)) import System.Console.CmdArgs -------------------------------------------------------------------------------- +import Paths_stylish_haskell (version) import StylishHaskell import StylishHaskell.Config @@ -27,7 +30,9 @@ stylishArgs :: StylishArgs stylishArgs = StylishArgs { config = Nothing &= typFile &= help "Configuration file" , files = [] &= typFile &= args - } &= summary "stylish-haskell" + } &= summary ("stylish-haskell-" ++ versionString version) + where + versionString = intercalate "." . map show . versionBranch -------------------------------------------------------------------------------- diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal index 7e8ee5c..840ccdc 100644 --- a/stylish-haskell.cabal +++ b/stylish-haskell.cabal @@ -24,6 +24,7 @@ Executable stylish-haskell Main-is: Main.hs Other-modules: + Paths_stylish_haskell StylishHaskell StylishHaskell.Block StylishHaskell.Config |