main :: IO ()
main = do
    -- XXX listToMaybe only takes the head
    margs <- fmap readMay . listToMaybe <$> getArgs

    mint <- maybe (readMay <$> getLine) return margs

    maybe warnNoArg run mint
  where
    warnNoArg = putStrLn "No argument Int provided."
main :: IO ()
main = do
    -- XXX listToMaybe only takes the head
    margs <- fmap readMay . listToMaybe <$> getArgs

    mint <- maybe (readMay <$> getLine) return margs

    maybe warnNoArg run mint
  where
    warnNoArg = putStrLn "No argument Int provided."
main = do
    -- XXX listToMaybe only takes the head
    margs <- fmap readMay . listToMaybe <$> getArgs

    mint <- maybe (readMay <$> getLine) return margs

    maybe warnNoArg run mint
  where
    warnNoArg = putStrLn "No argument Int provided."