From 58024e417e1271ac0e8c3f4b1d44e0801aca1500 Mon Sep 17 00:00:00 2001 From: Grigory Bordyugov Date: Thu, 9 Feb 2017 13:15:23 +0100 Subject: [PATCH] dialect variable in SimpleSqlParserTool.lhs --- tools/SimpleSqlParserTool.lhs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/SimpleSqlParserTool.lhs b/tools/SimpleSqlParserTool.lhs index b9e19b1..339cbcc 100644 --- a/tools/SimpleSqlParserTool.lhs +++ b/tools/SimpleSqlParserTool.lhs @@ -22,6 +22,8 @@ indent: parse then pretty print sql > import Language.SQL.SimpleSQL.Lex +> dialect = ansi2011 + > main :: IO () > main = do > args <- getArgs @@ -68,7 +70,7 @@ indent: parse then pretty print sql > (f,src) <- getInput args > either (error . peFormattedError) > (putStrLn . ppShow) -> $ parseStatements ansi2011 f Nothing src +> $ parseStatements dialect f Nothing src > ) > lexCommand :: (String,[String] -> IO ()) @@ -78,7 +80,7 @@ indent: parse then pretty print sql > (f,src) <- getInput args > either (error . peFormattedError) > (putStrLn . intercalate ",\n" . map show) -> $ lexSQL ansi2011 f Nothing src +> $ lexSQL dialect f Nothing src > ) @@ -88,7 +90,7 @@ indent: parse then pretty print sql > ,\args -> do > (f,src) <- getInput args > either (error . peFormattedError) -> (putStrLn . prettyStatements ansi2011) -> $ parseStatements ansi2011 f Nothing src +> (putStrLn . prettyStatements dialect) +> $ parseStatements dialect f Nothing src > )