1
Fork 0

tools/SimpleSqlParserTool.lhs fix

This commit is contained in:
Grigory Bordyugov 2017-02-09 11:45:26 +01:00
parent cef4205293
commit 9e24a308e7

View file

@ -17,9 +17,9 @@ indent: parse then pretty print sql
> import Control.Applicative > import Control.Applicative
> import Language.SQL.SimpleSQL.Pretty > import Language.SQL.SimpleSQL.Pretty
> import Language.SQL.SimpleSQL.Parser > import Language.SQL.SimpleSQL.Parse
> import Language.SQL.SimpleSQL.Syntax > import Language.SQL.SimpleSQL.Syntax
> import Language.SQL.SimpleSQL.Lexer > import Language.SQL.SimpleSQL.Lex
> main :: IO () > main :: IO ()
@ -68,7 +68,7 @@ indent: parse then pretty print sql
> (f,src) <- getInput args > (f,src) <- getInput args
> either (error . peFormattedError) > either (error . peFormattedError)
> (putStrLn . ppShow) > (putStrLn . ppShow)
> $ parseStatements SQL2011 f Nothing src > $ parseStatements ansi2011 f Nothing src
> ) > )
> lexCommand :: (String,[String] -> IO ()) > lexCommand :: (String,[String] -> IO ())
@ -78,7 +78,7 @@ indent: parse then pretty print sql
> (f,src) <- getInput args > (f,src) <- getInput args
> either (error . peFormattedError) > either (error . peFormattedError)
> (putStrLn . intercalate ",\n" . map show) > (putStrLn . intercalate ",\n" . map show)
> $ lexSQL SQL2011 f Nothing src > $ lexSQL ansi2011 f Nothing src
> ) > )
@ -88,7 +88,7 @@ indent: parse then pretty print sql
> ,\args -> do > ,\args -> do
> (f,src) <- getInput args > (f,src) <- getInput args
> either (error . peFormattedError) > either (error . peFormattedError)
> (putStrLn . prettyStatements SQL2011) > (putStrLn . prettyStatements ansi2011)
> $ parseStatements SQL2011 f Nothing src > $ parseStatements ansi2011 f Nothing src
> ) > )