# HG changeset patch # User unc0rr # Date 1223644745 0 # Node ID ae6c4f10ace272ae7ee6084d952d5b7b399bea5d # Parent 86d7d5ab22a25b628903986c8c9473a935085e11 Rename function diff -r 86d7d5ab22a2 -r ae6c4f10ace2 netserver/Opts.hs --- a/netserver/Opts.hs Fri Oct 10 13:18:45 2008 +0000 +++ b/netserver/Opts.hs Fri Oct 10 13:19:05 2008 +0000 @@ -11,11 +11,11 @@ options :: [OptDescr Flag] options = [ - Option ['p'] ["port"] (OptArg defaultPort "PORT") "listen on PORT" + Option ['p'] ["port"] (OptArg readPort "PORT") "listen on PORT" ] -defaultPort :: Maybe String -> Flag -defaultPort str = ListenPort $ fromInteger (fromMaybe 46631 (maybeRead (fromMaybe "46631" str) :: Maybe Integer)) +readPort :: Maybe String -> Flag +readPort str = ListenPort $ fromInteger (fromMaybe 46631 (maybeRead (fromMaybe "46631" str) :: Maybe Integer)) opts :: IO [Flag] opts = do