rename PrettyIt to SQLIdent and add to cabal
This commit is contained in:
parent
27a1723813
commit
2ae1ced7cc
|
@ -19,6 +19,10 @@ source-repository head
|
||||||
type: git
|
type: git
|
||||||
location: https://github.com/JakeWheat/simple-sql-parser.git
|
location: https://github.com/JakeWheat/simple-sql-parser.git
|
||||||
|
|
||||||
|
Flag sqlindent
|
||||||
|
Description: Build SQLIndent exe
|
||||||
|
Default: False
|
||||||
|
|
||||||
library
|
library
|
||||||
exposed-modules: Language.SQL.SimpleSQL.Pretty,
|
exposed-modules: Language.SQL.SimpleSQL.Pretty,
|
||||||
Language.SQL.SimpleSQL.Parser,
|
Language.SQL.SimpleSQL.Parser,
|
||||||
|
@ -67,3 +71,19 @@ Test-Suite Tests
|
||||||
other-extensions: TupleSections,OverloadedStrings
|
other-extensions: TupleSections,OverloadedStrings
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
|
executable SQLIndent
|
||||||
|
main-is: SQLIndent.lhs
|
||||||
|
hs-source-dirs: .,tools
|
||||||
|
Build-Depends: base >=4.6 && <4.7,
|
||||||
|
parsec >=3.1 && <3.2,
|
||||||
|
mtl >=2.1 && <2.2,
|
||||||
|
pretty >= 1.1 && < 1.2,
|
||||||
|
haskell-src-exts >= 1.14 && < 1.15,
|
||||||
|
simple-sql-parser
|
||||||
|
default-language: Haskell2010
|
||||||
|
ghc-options: -Wall
|
||||||
|
if flag(sqlindent)
|
||||||
|
buildable: True
|
||||||
|
else
|
||||||
|
buildable: False
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
> import Language.SQL.SimpleSQL.Pretty
|
> import Language.SQL.SimpleSQL.Pretty
|
||||||
> import Language.SQL.SimpleSQL.Parser
|
> import Language.SQL.SimpleSQL.Parser
|
||||||
> import Data.List
|
|
||||||
|
|
||||||
> main :: IO ()
|
> main :: IO ()
|
||||||
> main = do
|
> main = do
|
||||||
|
@ -14,4 +13,4 @@
|
||||||
> either (error . peFormattedError)
|
> either (error . peFormattedError)
|
||||||
> (putStrLn . prettyQueryExprs)
|
> (putStrLn . prettyQueryExprs)
|
||||||
> $ parseQueryExprs f Nothing src
|
> $ parseQueryExprs f Nothing src
|
||||||
> _ -> error "please pass filename to prettify"
|
> _ -> error "please pass filename to indent"
|
Loading…
Reference in a new issue