Revision 45f01962

b/hbal.hs
141 141
main :: IO ()
142 142
main = do
143 143
  cmd_args <- System.getArgs
144
  (opts, _) <- CLI.parseOpts cmd_args "hbal" options defaultOptions optShowHelp
144
  (opts, args) <- CLI.parseOpts cmd_args "hbal" options
145
                  defaultOptions optShowHelp
146

  
147
  unless (null args) $ do
148
         hPutStrLn stderr "Error: this program doesn't take any arguments."
149
         exitWith $ ExitFailure 1
145 150

  
146 151
  when (optShowVer opts) $ do
147 152
         putStr $ CLI.showVersion "hbal"
b/hn1.hs
123 123
main :: IO ()
124 124
main = do
125 125
  cmd_args <- System.getArgs
126
  (opts, _) <- CLI.parseOpts cmd_args "hn1" options defaultOptions optShowHelp
126
  (opts, args) <- CLI.parseOpts cmd_args "hn1" options
127
                  defaultOptions optShowHelp
128

  
129
  unless (null args) $ do
130
         hPutStrLn stderr "Error: this program doesn't take any arguments."
131
         exitWith $ ExitFailure 1
127 132

  
128 133
  when (optShowVer opts) $ do
129 134
         printf $ CLI.showVersion "hn1"

Also available in: Unified diff