1
Fork 0

tweak haddock, remove CPP (only causes a warning with ghc 8.2.1), other small tweaks

This commit is contained in:
Jake Wheat 2019-09-01 10:04:04 +01:00
parent df8a8e8df3
commit 7f1351c123
4 changed files with 13 additions and 19 deletions

View file

@ -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

View file

@ -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.

View file

@ -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,

View file

@ -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