diff --git a/Language/SQL/SimpleSQL/Dialect.lhs b/Language/SQL/SimpleSQL/Dialect.lhs index e62b235..14f8120 100644 --- a/Language/SQL/SimpleSQL/Dialect.lhs +++ b/Language/SQL/SimpleSQL/Dialect.lhs @@ -21,29 +21,29 @@ Data types to represent different dialect options > { -- | the list of reserved keywords > diKeywords :: [String] > -- | the list of reserved keywords, which can also be used as -> -- | an identifier +> -- an identifier > ,diIdentifierKeywords :: [String] > -- | the list of reserved keywords, which can also be used as -> -- | a function name (including aggregates and window -> -- | functions) +> -- a function name (including aggregates and window +> -- functions) > ,diAppKeywords :: [String] > -- | all the type names which are also reserved keywords, and -> -- | all the type names which are multiple words +> -- all the type names which are multiple words > ,diSpecialTypeNames :: [String] -> -- | does the dialect support ansi fetch first syntax +> -- | allow ansi fetch first syntax > ,diFetchFirst :: Bool -> -- | does the dialect support limit keyword (mysql, postgres, -> -- | ...) +> -- | allow limit keyword (mysql, postgres, +> -- ...) > ,diLimit :: Bool > -- | allow parsing ODBC syntax > ,diOdbc :: Bool -> -- | allow quoting identifiers with `backquotes` +> -- | allow quoting identifiers with \`backquotes\` > ,diBackquotedIden :: Bool > -- | allow quoting identifiers with [square brackets] > ,diSquareBracketQuotedIden :: Bool > -- | allow identifiers with a leading at @example > ,diAtIdentifier :: Bool -> -- | allow identifiers with a leading # #example +> -- | allow identifiers with a leading \# \#example > ,diHashIdentifier :: Bool > -- | allow positional identifiers like this: $1 > ,diPositionalArg :: Bool diff --git a/Language/SQL/SimpleSQL/Pretty.lhs b/Language/SQL/SimpleSQL/Pretty.lhs index abc1d1c..3d0e5a7 100644 --- a/Language/SQL/SimpleSQL/Pretty.lhs +++ b/Language/SQL/SimpleSQL/Pretty.lhs @@ -1,5 +1,4 @@ -> {-# LANGUAGE CPP #-} > -- | These is the pretty printing functions, which produce SQL > -- source from ASTs. The code attempts to format the output in a > -- readable way. @@ -10,12 +9,8 @@ > ,prettyStatements > ) where -#if MIN_VERSION_base(4,11,0) - > import Prelude hiding ((<>)) -#endif - TODO: there should be more comments in this file, especially the bits which have been changed to try to improve the layout of the output. diff --git a/simple-sql-parser.cabal b/simple-sql-parser.cabal index 60c00c2..6907633 100644 --- a/simple-sql-parser.cabal +++ b/simple-sql-parser.cabal @@ -38,11 +38,10 @@ library exposed-modules: Language.SQL.SimpleSQL.Pretty, Language.SQL.SimpleSQL.Parse, Language.SQL.SimpleSQL.Lex, - Language.SQL.SimpleSQL.Syntax - Other-Modules: Language.SQL.SimpleSQL.Errors, - Language.SQL.SimpleSQL.Combinators, + Language.SQL.SimpleSQL.Syntax, Language.SQL.SimpleSQL.Dialect - other-extensions: TupleSections + Other-Modules: Language.SQL.SimpleSQL.Errors, + Language.SQL.SimpleSQL.Combinators build-depends: base >=4 && <5, parsec >=3.1 && <3.2, mtl >=2.1 && <2.3, diff --git a/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs b/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs index d143de0..f2397d3 100644 --- a/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs +++ b/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs @@ -50,7 +50,7 @@ Tests for parsing scalar expressions > [("iden1", Iden [Name Nothing "iden1"]) > --,("t.a", Iden2 "t" "a") > ,("\"quoted identifier\"", Iden [Name (Just ("\"","\"")) "quoted identifier"]) -> ,("\"period\"", Iden [Name (Just ("\"","\"")) "period"]) +> ,("\"from\"", Iden [Name (Just ("\"","\"")) "from"]) > ] > star :: TestItem