Revision 29ac5975

b/src/Utils.hs
2 2

  
3 3
module Utils where
4 4

  
5
import Data.List
6 5
import Data.Either
6
import Data.List
7
import qualified Data.Version
8
import Monad
7 9
import System
8 10
import System.IO
9
import Monad
11
import System.Info
12
import Text.Printf
13
import qualified Version
10 14

  
11 15
import Debug.Trace
12 16

  
......
78 82
         putStrLn $ fromLeft nd
79 83
         exitWith $ ExitFailure 1
80 84
  return $ fromRight nd
85

  
86
showVersion :: String -- ^ The program name
87
            -> String -- ^ The formatted version and other information data
88
showVersion name =
89
    printf "%s %s\ncompiled with %s %s\nrunning on %s %s\n"
90
           name Version.version
91
           compilerName (Data.Version.showVersion compilerVersion)
92
           os arch
b/src/hbal.hs
140 140
  (opts, _) <- parseOpts cmd_args
141 141

  
142 142
  when (optShowVer opts) $ do
143
         printf "hbal %s\n" Version.version
143
         putStr $ showVersion "hbal"
144 144
         exitWith ExitSuccess
145 145

  
146 146
  let oneline = optOneline opts
b/src/hn1.hs
132 132
  (opts, _) <- parseOpts cmd_args
133 133

  
134 134
  when (optShowVer opts) $ do
135
         printf "hn1 %s\n" Version.version
135
         printf $ showVersion "hn1"
136 136
         exitWith ExitSuccess
137 137

  
138 138
  let min_depth = optMinDepth opts

Also available in: Unified diff