1
Fork 0
simple-sql-parser/tools/SQLIndent.lhs
2013-12-19 10:31:27 +02:00

17 lines
436 B
Plaintext

> import System.Environment
> import Language.SQL.SimpleSQL.Pretty
> import Language.SQL.SimpleSQL.Parser
> main :: IO ()
> main = do
> args <- getArgs
> case args of
> [f] -> do
> src <- readFile f
> either (error . peFormattedError)
> (putStrLn . prettyQueryExprs)
> $ parseQueryExprs f Nothing src
> _ -> error "please pass filename to indent"