1
Fork 0

fix some warnings, small tweaks to the build

This commit is contained in:
Jake Wheat 2019-08-31 13:41:07 +01:00
parent 020b33e729
commit 4c8f612f56
4 changed files with 9 additions and 5 deletions

View file

@ -15,11 +15,10 @@
> ,(<$$$$$>) > ,(<$$$$$>)
> ) where > ) where
> import Control.Applicative ((<$>), (<*>), (<**>), pure, Applicative) > import Control.Applicative ((<**>))
> import Text.Parsec (option,many) > import Text.Parsec (option,many)
> import Text.Parsec.String (GenParser) > import Text.Parsec.String (GenParser)
a possible issue with the option suffix is that it enforces left a possible issue with the option suffix is that it enforces left
associativity when chaining it recursively. Have to review associativity when chaining it recursively. Have to review
all these uses and figure out if any should be right associative all these uses and figure out if any should be right associative

View file

@ -6,7 +6,7 @@
.PHONY : build .PHONY : build
build : build :
cabal v2-build --enable-tests cabal v2-build --enable-tests -fparserexe
.PHONY : test .PHONY : test
test : test :

View file

@ -30,6 +30,10 @@ Flag parserexe
Description: Build SimpleSqlParserTool exe Description: Build SimpleSqlParserTool exe
Default: False Default: False
Flag fixitytest
Description: Build fixity test exe
Default: False
library library
exposed-modules: Language.SQL.SimpleSQL.Pretty, exposed-modules: Language.SQL.SimpleSQL.Pretty,
Language.SQL.SimpleSQL.Parse, Language.SQL.SimpleSQL.Parse,
@ -130,7 +134,7 @@ executable Fixity
other-extensions: TupleSections,DeriveDataTypeable other-extensions: TupleSections,DeriveDataTypeable
default-language: Haskell2010 default-language: Haskell2010
ghc-options: -Wall ghc-options: -Wall
if flag(parserexe) if flag(fixitytest)
buildable: True buildable: True
else else
buildable: False buildable: False

View file

@ -14,7 +14,7 @@ indent: parse then pretty print sql
> import System.Exit > import System.Exit
> import Data.List > import Data.List
> import Text.Show.Pretty > import Text.Show.Pretty
> import Control.Applicative > --import Control.Applicative
> import Language.SQL.SimpleSQL.Pretty > import Language.SQL.SimpleSQL.Pretty
> import Language.SQL.SimpleSQL.Parse > import Language.SQL.SimpleSQL.Parse
@ -22,6 +22,7 @@ indent: parse then pretty print sql
> import Language.SQL.SimpleSQL.Lex > import Language.SQL.SimpleSQL.Lex
> dialect :: Dialect
> dialect = ansi2011 > dialect = ansi2011
> main :: IO () > main :: IO ()