netserver/Opts.hs
changeset 1342 ae6c4f10ace2
parent 1341 86d7d5ab22a2
child 1383 d20e6e8928e3
--- 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