main :: IO ()
main = do
    args <- getArgs
    when (length args /= 3) $ do
        progName <- getProgName
        die
            (  "Usage: "
            <> progName
            <> " Y day problemNumber. Ex: "
            <> progName
            <> " 2015 7 1"
            )
    let (year:day:pbNumber:rest) = map read args :: [Int]
    case year of
        2015 -> run2015 day pbNumber
        2016 -> run2016 day pbNumber
        2017 -> run2017 day pbNumber
        2018 -> run2018 day pbNumber
        _    -> die $ "year unknown: " <> show year
main :: IO ()
main = do
    args <- getArgs
    when (length args /= 3) $ do
        progName <- getProgName
        die
            (  "Usage: "
            <> progName
            <> " Y day problemNumber. Ex: "
            <> progName
            <> " 2015 7 1"
            )
    let (year:day:pbNumber:rest) = map read args :: [Int]
    case year of
        2015 -> run2015 day pbNumber
        2016 -> run2016 day pbNumber
        2017 -> run2017 day pbNumber
        2018 -> run2018 day pbNumber
        _    -> die $ "year unknown: " <> show year
main = do
    args <- getArgs
    when (length args /= 3) $ do
        progName <- getProgName
        die
            (  "Usage: "
            <> progName
            <> " Y day problemNumber. Ex: "
            <> progName
            <> " 2015 7 1"
            )
    let (year:day:pbNumber:rest) = map read args :: [Int]
    case year of
        2015 -> run2015 day pbNumber
        2016 -> run2016 day pbNumber
        2017 -> run2017 day pbNumber
        2018 -> run2018 day pbNumber
        _    -> die $ "year unknown: " <> show year