diff --git a/Language/SQL/SimpleSQL/Combinators.lhs b/Language/SQL/SimpleSQL/Combinators.lhs index 733743c..446453f 100644 --- a/Language/SQL/SimpleSQL/Combinators.lhs +++ b/Language/SQL/SimpleSQL/Combinators.lhs @@ -15,11 +15,10 @@ > ,(<$$$$$>) > ) where -> import Control.Applicative ((<$>), (<*>), (<**>), pure, Applicative) +> import Control.Applicative ((<**>)) > import Text.Parsec (option,many) > import Text.Parsec.String (GenParser) - a possible issue with the option suffix is that it enforces left associativity when chaining it recursively. Have to review all these uses and figure out if any should be right associative diff --git a/Makefile b/Makefile index 0222ac2..62d9deb 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ .PHONY : build build : - cabal v2-build --enable-tests + cabal v2-build --enable-tests -fparserexe .PHONY : test test : diff --git a/simple-sql-parser.cabal b/simple-sql-parser.cabal index d73f054..db4c4cb 100644 --- a/simple-sql-parser.cabal +++ b/simple-sql-parser.cabal @@ -30,6 +30,10 @@ Flag parserexe Description: Build SimpleSqlParserTool exe Default: False +Flag fixitytest + Description: Build fixity test exe + Default: False + library exposed-modules: Language.SQL.SimpleSQL.Pretty, Language.SQL.SimpleSQL.Parse, @@ -130,7 +134,7 @@ executable Fixity other-extensions: TupleSections,DeriveDataTypeable default-language: Haskell2010 ghc-options: -Wall - if flag(parserexe) + if flag(fixitytest) buildable: True else buildable: False diff --git a/tools/SimpleSqlParserTool.lhs b/tools/SimpleSqlParserTool.lhs index fe2765a..eae9be3 100644 --- a/tools/SimpleSqlParserTool.lhs +++ b/tools/SimpleSqlParserTool.lhs @@ -14,7 +14,7 @@ indent: parse then pretty print sql > import System.Exit > import Data.List > import Text.Show.Pretty -> import Control.Applicative +> --import Control.Applicative > import Language.SQL.SimpleSQL.Pretty > import Language.SQL.SimpleSQL.Parse @@ -22,6 +22,7 @@ indent: parse then pretty print sql > import Language.SQL.SimpleSQL.Lex +> dialect :: Dialect > dialect = ansi2011 > main :: IO ()