diff --git a/bench.cabal b/bench.cabal index 2a2b52f..df3c224 100644 --- a/bench.cabal +++ b/bench.cabal @@ -33,3 +33,4 @@ executable bench , text < 1.3 , turtle >= 1.2.5 && < 1.5 ghc-options: -Wall -O2 -threaded + other-modules: Paths_bench diff --git a/src/Main.hs b/src/Main.hs index 41cf888..3fa228c 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -13,14 +13,16 @@ import qualified Criterion import qualified Criterion.Main as Criterion import qualified Criterion.Main.Options as Criterion import qualified Data.Text as Text +import qualified Data.Version import qualified Options.Applicative +import qualified Paths_bench import qualified System.IO as IO import qualified System.IO.Silently as Silently import qualified System.Process import qualified Turtle version :: Text -version = "1.0.2" +version = Text.pack (Data.Version.showVersion Paths_bench.version) data Options = Options [Text] Criterion.Mode | Version deriving (Show)