From fd8356aa1b74cde32bd50289bac1d1f3a37ef678 Mon Sep 17 00:00:00 2001 From: Grigory Bordyugov Date: Tue, 27 Nov 2018 17:54:53 +0100 Subject: [PATCH] read stdin --- tools/SimpleSqlParserTool.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/SimpleSqlParserTool.lhs b/tools/SimpleSqlParserTool.lhs index 339cbcc..fe2765a 100644 --- a/tools/SimpleSqlParserTool.lhs +++ b/tools/SimpleSqlParserTool.lhs @@ -58,7 +58,7 @@ indent: parse then pretty print sql > getInput :: [String] -> IO (FilePath,String) > getInput as = > case as of -> ["-"] -> error "read stdin" +> ["-"] -> ("-",) <$> getContents > ("-c":as') -> return ("-", unwords as') > [filename] -> (filename,) <$> readFile filename > _ -> showHelp (Just "arguments not recognised") >> error ""