Revision 45f01962 hn1.hs

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