diff --git a/Language/SQL/SimpleSQL/Pretty.hs b/Language/SQL/SimpleSQL/Pretty.hs index f1abd42..c3a2921 100644 --- a/Language/SQL/SimpleSQL/Pretty.hs +++ b/Language/SQL/SimpleSQL/Pretty.hs @@ -406,6 +406,7 @@ queryExpr d (Values vs) = pretty "values" <+> nest 7 (commaSep (map (parens . commaSep . map (scalarExpr d)) vs)) queryExpr _ (Table t) = pretty "table" <+> names t +queryExpr d (QueryExprParens qe) = parens (queryExpr d qe) queryExpr d (QEComment cmt v) = vsep $ map comment cmt <> [queryExpr d v] diff --git a/Language/SQL/SimpleSQL/Syntax.hs b/Language/SQL/SimpleSQL/Syntax.hs index e2955a4..26b82fc 100644 --- a/Language/SQL/SimpleSQL/Syntax.hs +++ b/Language/SQL/SimpleSQL/Syntax.hs @@ -373,6 +373,7 @@ This would make some things a bit cleaner? ,qeQueryExpression :: QueryExpr} | Values [[ScalarExpr]] | Table [Name] + | QueryExprParens QueryExpr | QEComment [Comment] QueryExpr deriving (Eq,Show,Read,Data,Typeable)