cabal-version: 3.0
name: postgresql-syntax
version: 0.5.0.2
category: Database, PostgreSQL, Parsing
synopsis: PostgreSQL AST parsing and rendering
description:
Postgres syntax tree and related utils extracted from the \"hasql-th\" package.
homepage: https://github.com/nikita-volkov/postgresql-syntax
bug-reports: https://github.com/nikita-volkov/postgresql-syntax/issues
author: Nikita Volkov <nikita.y.volkov@mail.ru>
maintainer: Nikita Volkov <nikita.y.volkov@mail.ru>
copyright: (c) 2020, Nikita Volkov
license: MIT
license-file: LICENSE
extra-doc-files:
CHANGELOG.md
LICENSE
README.md
source-repository head
type: git
location: https://github.com/nikita-volkov/postgresql-syntax
common base-settings
default-language: Haskell2010
default-extensions:
ApplicativeDo
BangPatterns
ConstraintKinds
DataKinds
DefaultSignatures
DeriveDataTypeable
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveTraversable
DuplicateRecordFields
EmptyDataDecls
FlexibleContexts
FlexibleInstances
FunctionalDependencies
GADTs
GeneralizedNewtypeDeriving
LambdaCase
LiberalTypeSynonyms
MagicHash
MultiParamTypeClasses
MultiWayIf
NoImplicitPrelude
NoMonomorphismRestriction
OverloadedStrings
ParallelListComp
PatternGuards
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
TypeFamilies
TypeOperators
UnboxedTuples
library internal
import: base-settings
hs-source-dirs: library-internal
exposed-modules:
PostgresqlSyntax.Algebra
PostgresqlSyntax.Ast
PostgresqlSyntax.Ast.AExpr
PostgresqlSyntax.Ast.AexprConst
PostgresqlSyntax.Ast.AExprReversableOp
PostgresqlSyntax.Ast.AliasClause
PostgresqlSyntax.Ast.AllOp
PostgresqlSyntax.Ast.AnyName
PostgresqlSyntax.Ast.AnyOperator
PostgresqlSyntax.Ast.ArrayBounds
PostgresqlSyntax.Ast.ArrayExpr
PostgresqlSyntax.Ast.ArrayExprList
PostgresqlSyntax.Ast.AscDesc
PostgresqlSyntax.Ast.Attrs
PostgresqlSyntax.Ast.Bconst
PostgresqlSyntax.Ast.BExpr
PostgresqlSyntax.Ast.BExprIsOp
PostgresqlSyntax.Ast.Bit
PostgresqlSyntax.Ast.CallStmt
PostgresqlSyntax.Ast.CaseExpr
PostgresqlSyntax.Ast.CExpr
PostgresqlSyntax.Ast.Character
PostgresqlSyntax.Ast.Columnref
PostgresqlSyntax.Ast.CommonTableExpr
PostgresqlSyntax.Ast.ConfExpr
PostgresqlSyntax.Ast.ConstCharacter
PostgresqlSyntax.Ast.ConstDatetime
PostgresqlSyntax.Ast.ConstTypename
PostgresqlSyntax.Ast.DeleteStmt
PostgresqlSyntax.Ast.ExplicitRow
PostgresqlSyntax.Ast.ExprList
PostgresqlSyntax.Ast.ExtractArg
PostgresqlSyntax.Ast.ExtractList
PostgresqlSyntax.Ast.Fconst
PostgresqlSyntax.Ast.ForLockingClause
PostgresqlSyntax.Ast.ForLockingItem
PostgresqlSyntax.Ast.ForLockingStrength
PostgresqlSyntax.Ast.FrameBound
PostgresqlSyntax.Ast.FrameClause
PostgresqlSyntax.Ast.FrameClauseMode
PostgresqlSyntax.Ast.FrameExtent
PostgresqlSyntax.Ast.FromClause
PostgresqlSyntax.Ast.FromList
PostgresqlSyntax.Ast.FuncAliasClause
PostgresqlSyntax.Ast.FuncApplication
PostgresqlSyntax.Ast.FuncApplicationParams
PostgresqlSyntax.Ast.FuncArgExpr
PostgresqlSyntax.Ast.FuncConstArgs
PostgresqlSyntax.Ast.FuncExpr
PostgresqlSyntax.Ast.FuncExprCommonSubexpr
PostgresqlSyntax.Ast.FuncExprWindowless
PostgresqlSyntax.Ast.FuncName
PostgresqlSyntax.Ast.FuncTable
PostgresqlSyntax.Ast.GenericType
PostgresqlSyntax.Ast.GroupByItem
PostgresqlSyntax.Ast.GroupClause
PostgresqlSyntax.Ast.HavingClause
PostgresqlSyntax.Ast.Iconst
PostgresqlSyntax.Ast.Ident
PostgresqlSyntax.Ast.ImplicitRow
PostgresqlSyntax.Ast.IndexElem
PostgresqlSyntax.Ast.IndexElemDef
PostgresqlSyntax.Ast.IndexParams
PostgresqlSyntax.Ast.Indirection
PostgresqlSyntax.Ast.IndirectionEl
PostgresqlSyntax.Ast.InExpr
PostgresqlSyntax.Ast.InsertColumnItem
PostgresqlSyntax.Ast.InsertColumnList
PostgresqlSyntax.Ast.InsertRest
PostgresqlSyntax.Ast.InsertStmt
PostgresqlSyntax.Ast.InsertTarget
PostgresqlSyntax.Ast.Interval
PostgresqlSyntax.Ast.IntervalSecond
PostgresqlSyntax.Ast.IntoClause
PostgresqlSyntax.Ast.JoinedTable
PostgresqlSyntax.Ast.JoinQual
PostgresqlSyntax.Ast.JoinType
PostgresqlSyntax.Ast.LimitClause
PostgresqlSyntax.Ast.MathOp
PostgresqlSyntax.Ast.NameList
PostgresqlSyntax.Ast.NullsOrder
PostgresqlSyntax.Ast.Numeric
PostgresqlSyntax.Ast.OffsetClause
PostgresqlSyntax.Ast.OnConflict
PostgresqlSyntax.Ast.OnConflictDo
PostgresqlSyntax.Ast.Op
PostgresqlSyntax.Ast.OptOrdinality
PostgresqlSyntax.Ast.OptTempTableName
PostgresqlSyntax.Ast.OptVarying
PostgresqlSyntax.Ast.OverClause
PostgresqlSyntax.Ast.OverlayList
PostgresqlSyntax.Ast.OverrideKind
PostgresqlSyntax.Ast.PositionList
PostgresqlSyntax.Ast.PreparableStmt
PostgresqlSyntax.Ast.QualAllOp
PostgresqlSyntax.Ast.QualifiedName
PostgresqlSyntax.Ast.QualOp
PostgresqlSyntax.Ast.RelationExpr
PostgresqlSyntax.Ast.RelationExprOptAlias
PostgresqlSyntax.Ast.ReturningClause
PostgresqlSyntax.Ast.Row
PostgresqlSyntax.Ast.RowsfromItem
PostgresqlSyntax.Ast.RowsfromList
PostgresqlSyntax.Ast.Sconst
PostgresqlSyntax.Ast.SelectBinOp
PostgresqlSyntax.Ast.SelectClause
PostgresqlSyntax.Ast.SelectFetchFirstValue
PostgresqlSyntax.Ast.SelectLimit
PostgresqlSyntax.Ast.SelectLimitValue
PostgresqlSyntax.Ast.SelectNoParens
PostgresqlSyntax.Ast.SelectStmt
PostgresqlSyntax.Ast.SelectWithParens
PostgresqlSyntax.Ast.SetClause
PostgresqlSyntax.Ast.SetClauseList
PostgresqlSyntax.Ast.SetTarget
PostgresqlSyntax.Ast.SetTargetList
PostgresqlSyntax.Ast.SimpleSelect
PostgresqlSyntax.Ast.SimpleTypename
PostgresqlSyntax.Ast.SortBy
PostgresqlSyntax.Ast.SortClause
PostgresqlSyntax.Ast.SubqueryOp
PostgresqlSyntax.Ast.SubstrList
PostgresqlSyntax.Ast.SubstrListFromFor
PostgresqlSyntax.Ast.SubType
PostgresqlSyntax.Ast.SymbolicExprBinOp
PostgresqlSyntax.Ast.TableFuncElement
PostgresqlSyntax.Ast.TableFuncElementList
PostgresqlSyntax.Ast.TableRef
PostgresqlSyntax.Ast.TablesampleClause
PostgresqlSyntax.Ast.TargetEl
PostgresqlSyntax.Ast.Targeting
PostgresqlSyntax.Ast.TargetList
PostgresqlSyntax.Ast.Timezone
PostgresqlSyntax.Ast.TrimList
PostgresqlSyntax.Ast.TrimModifier
PostgresqlSyntax.Ast.TypeList
PostgresqlSyntax.Ast.Typename
PostgresqlSyntax.Ast.TypenameArrayDimensions
PostgresqlSyntax.Ast.UpdateStmt
PostgresqlSyntax.Ast.UsingClause
PostgresqlSyntax.Ast.ValuesClause
PostgresqlSyntax.Ast.VerbalExprBinOp
PostgresqlSyntax.Ast.WhenClause
PostgresqlSyntax.Ast.WhenClauseList
PostgresqlSyntax.Ast.WhereClause
PostgresqlSyntax.Ast.WhereOrCurrentClause
PostgresqlSyntax.Ast.WindowClause
PostgresqlSyntax.Ast.WindowDefinition
PostgresqlSyntax.Ast.WindowExclusionClause
PostgresqlSyntax.Ast.WindowSpecification
PostgresqlSyntax.Ast.WithClause
PostgresqlSyntax.Ast.Xconst
PostgresqlSyntax.CharSet
PostgresqlSyntax.Extras.Error
PostgresqlSyntax.Extras.HeadedMegaparsec
PostgresqlSyntax.Extras.NonEmpty
PostgresqlSyntax.Extras.TextBuilder
PostgresqlSyntax.Helpers.Gens
PostgresqlSyntax.Helpers.Parsers
PostgresqlSyntax.Helpers.Shrinks
PostgresqlSyntax.Helpers.TextBuilders
PostgresqlSyntax.KeywordSet
PostgresqlSyntax.Predicate
PostgresqlSyntax.Prelude
PostgresqlSyntax.Settings
PostgresqlSyntax.Validation
build-depends:
base >=4.12 && <5,
bytestring >=0.10 && <0.13,
case-insensitive >=1.2.1 && <2,
hashable >=1.3.5 && <2,
headed-megaparsec >=0.2.0.1 && <0.3,
megaparsec >=9.2 && <10,
parser-combinators >=1.3 && <1.4,
QuickCheck >=2.17 && <3,
text >=1 && <3,
text-builder >=1 && <1.1,
unordered-containers >=0.2.16 && <0.3,
library
import: base-settings
hs-source-dirs: library
exposed-modules:
PostgresqlSyntax
build-depends:
postgresql-syntax:internal
test-suite hspec-test
import: base-settings
type: exitcode-stdio-1.0
hs-source-dirs: hspec-test
main-is: Main.hs
other-modules:
Ast.AexprConstSpec
Ast.AExprReversableOpSpec
Ast.AExprSpec
Ast.AliasClauseSpec
Ast.AllOpSpec
Ast.AnyNameSpec
Ast.AnyOperatorSpec
Ast.ArrayBoundsSpec
Ast.ArrayExprListSpec
Ast.ArrayExprSpec
Ast.AscDescSpec
Ast.AttrsSpec
Ast.BconstSpec
Ast.BExprIsOpSpec
Ast.BExprSpec
Ast.BitSpec
Ast.CallStmtSpec
Ast.CaseExprSpec
Ast.CExprSpec
Ast.CharacterSpec
Ast.ColumnrefSpec
Ast.CommonTableExprSpec
Ast.ConfExprSpec
Ast.ConstCharacterSpec
Ast.ConstDatetimeSpec
Ast.ConstTypenameSpec
Ast.DeleteStmtSpec
Ast.ExplicitRowSpec
Ast.ExprListSpec
Ast.ExtractArgSpec
Ast.ExtractListSpec
Ast.FconstSpec
Ast.ForLockingClauseSpec
Ast.ForLockingItemSpec
Ast.ForLockingStrengthSpec
Ast.FrameBoundSpec
Ast.FrameClauseModeSpec
Ast.FrameClauseSpec
Ast.FrameExtentSpec
Ast.FromClauseSpec
Ast.FromListSpec
Ast.FuncAliasClauseSpec
Ast.FuncApplicationParamsSpec
Ast.FuncApplicationSpec
Ast.FuncArgExprSpec
Ast.FuncConstArgsSpec
Ast.FuncExprCommonSubexprSpec
Ast.FuncExprSpec
Ast.FuncExprWindowlessSpec
Ast.FuncNameSpec
Ast.FuncTableSpec
Ast.GenericTypeSpec
Ast.GroupByItemSpec
Ast.GroupClauseSpec
Ast.HavingClauseSpec
Ast.IconstSpec
Ast.IdentSpec
Ast.ImplicitRowSpec
Ast.IndexElemDefSpec
Ast.IndexElemSpec
Ast.IndexParamsSpec
Ast.IndirectionElSpec
Ast.IndirectionSpec
Ast.InExprSpec
Ast.InsertColumnItemSpec
Ast.InsertColumnListSpec
Ast.InsertRestSpec
Ast.InsertStmtSpec
Ast.InsertTargetSpec
Ast.IntervalSecondSpec
Ast.IntervalSpec
Ast.IntoClauseSpec
Ast.JoinedTableSpec
Ast.JoinQualSpec
Ast.JoinTypeSpec
Ast.LimitClauseSpec
Ast.MathOpSpec
Ast.NameListSpec
Ast.NullsOrderSpec
Ast.NumericSpec
Ast.OffsetClauseSpec
Ast.OnConflictDoSpec
Ast.OnConflictSpec
Ast.OpSpec
Ast.OptOrdinalitySpec
Ast.OptTempTableNameSpec
Ast.OptVaryingSpec
Ast.OverClauseSpec
Ast.OverlayListSpec
Ast.OverrideKindSpec
Ast.PositionListSpec
Ast.PreparableStmtSpec
Ast.QualAllOpSpec
Ast.QualifiedNameSpec
Ast.QualOpSpec
Ast.RelationExprOptAliasSpec
Ast.RelationExprSpec
Ast.ReturningClauseSpec
Ast.RowsfromItemSpec
Ast.RowsfromListSpec
Ast.RowSpec
Ast.SconstSpec
Ast.SelectBinOpSpec
Ast.SelectClauseSpec
Ast.SelectFetchFirstValueSpec
Ast.SelectLimitSpec
Ast.SelectLimitValueSpec
Ast.SelectNoParensSpec
Ast.SelectStmtSpec
Ast.SelectWithParensSpec
Ast.SetClauseListSpec
Ast.SetClauseSpec
Ast.SetTargetListSpec
Ast.SetTargetSpec
Ast.SimpleSelectSpec
Ast.SimpleTypenameSpec
Ast.SortBySpec
Ast.SortClauseSpec
Ast.SubqueryOpSpec
Ast.SubstrListFromForSpec
Ast.SubstrListSpec
Ast.SubTypeSpec
Ast.SymbolicExprBinOpSpec
Ast.TableFuncElementListSpec
Ast.TableFuncElementSpec
Ast.TableRefSpec
Ast.TablesampleClauseSpec
Ast.TargetElSpec
Ast.TargetingSpec
Ast.TargetListSpec
Ast.TimezoneSpec
Ast.TrimListSpec
Ast.TrimModifierSpec
Ast.TypeListSpec
Ast.TypenameArrayDimensionsSpec
Ast.TypenameSpec
Ast.UpdateStmtSpec
Ast.UsingClauseSpec
Ast.ValuesClauseSpec
Ast.VerbalExprBinOpSpec
Ast.WhenClauseListSpec
Ast.WhenClauseSpec
Ast.WhereClauseSpec
Ast.WhereOrCurrentClauseSpec
Ast.WindowClauseSpec
Ast.WindowDefinitionSpec
Ast.WindowExclusionClauseSpec
Ast.WindowSpecificationSpec
Ast.WithClauseSpec
Ast.XconstSpec
Helpers.Expectations
Helpers.Specs
Spec
ghc-options:
-threaded
-rtsopts
-with-rtsopts=-N
build-tool-depends:
hspec-discover:hspec-discover >=2.10 && <3
build-depends:
hspec >=2.10 && <3,
megaparsec >=9.2 && <10,
postgresql-syntax:internal,
QuickCheck >=2.17 && <3,
rerebase >=1.6.1 && <2,
benchmark keyword-bench
import: base-settings
type: exitcode-stdio-1.0
hs-source-dirs:
bench
main-is: Main.hs
ghc-options: -O2
build-depends:
containers >=0.4 && <1,
criterion >=1.6 && <1.7,
headed-megaparsec >=0.2.0.1 && <0.3,
megaparsec >=9.2 && <10,
postgresql-syntax,
QuickCheck >=2.17 && <3,
rerebase >=1.6.1 && <2,
benchmark nesting-bench
import: base-settings
type: exitcode-stdio-1.0
hs-source-dirs: nesting-bench
main-is: Main.hs
ghc-options:
-O2
-threaded
build-depends:
clock >=0.8 && <1,
postgresql-syntax,
rerebase >=1.6.1 && <2,