produceAST :: [Flag] -> IO ()
produceAST flags = do
    pipeBinary lang $ compileToJSON pat
    where (Language lang) = fromMaybe (Language "echo") (find isLanguage flags)
          (Pattern pat)   = fromJust $ find isPattern flags
produceAST :: [Flag] -> IO ()
produceAST flags = do
    pipeBinary lang $ compileToJSON pat
    where (Language lang) = fromMaybe (Language "echo") (find isLanguage flags)
          (Pattern pat)   = fromJust $ find isPattern flags
produceAST flags = do
    pipeBinary lang $ compileToJSON pat
    where (Language lang) = fromMaybe (Language "echo") (find isLanguage flags)
          (Pattern pat)   = fromJust $ find isPattern flags