main = do
  args <- getArgs
  p <- return $ case args of
                  [] -> 8000
                  (p : _) -> read p
  serve (Just defaultServerConfig{port = p}) homePage
main = do
  args <- getArgs
  p <- return $ case args of
                  [] -> 8000
                  (p : _) -> read p
  serve (Just defaultServerConfig{port = p}) homePage
main = do
  args <- getArgs
  p <- return $ case args of
                  [] -> 8000
                  (p : _) -> read p
  serve (Just defaultServerConfig{port = p}) homePage