main :: IO ()
main = do
    result <- getArgs >>= programOpts
    let errs = filter (getCheck result) checks
    if not $ null errs
        then printUsage $ concatMap checkMessage errs
        else let (opts, _) = result
                 in produceAST opts
main :: IO ()
main = do
    result <- getArgs >>= programOpts
    let errs = filter (getCheck result) checks
    if not $ null errs
        then printUsage $ concatMap checkMessage errs
        else let (opts, _) = result
                 in produceAST opts
main = do
    result <- getArgs >>= programOpts
    let errs = filter (getCheck result) checks
    if not $ null errs
        then printUsage $ concatMap checkMessage errs
        else let (opts, _) = result
                 in produceAST opts