Revision 75d1edf8 hail.hs

b/hail.hs
41 41
    , optShowHelp  :: Bool           -- ^ Just show the help
42 42
    } deriving Show
43 43

  
44
instance CLI.CLIOptions Options where
45
    showVersion = optShowVer
46
    showHelp    = optShowHelp
47

  
44 48
-- | Default values for the command line options.
45 49
defaultOptions :: Options
46 50
defaultOptions  = Options
......
163 167
main = do
164 168
  cmd_args <- System.getArgs
165 169
  (opts, args) <- CLI.parseOpts cmd_args "hail" options
166
                  defaultOptions optShowHelp
167

  
168
  when (optShowVer opts) $ do
169
         putStr $ CLI.showVersion "hbal"
170
         exitWith ExitSuccess
170
                  defaultOptions
171 171

  
172 172
  when (null args) $ do
173 173
         hPutStrLn stderr "Error: this program needs an input file."

Also available in: Unified diff