summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
authorThomas Hallgren <th-github@altocumulus.org>2019-03-20 14:39:42 +0100
committerThomas Hallgren <th-github@altocumulus.org>2019-03-20 14:39:42 +0100
commit0f53431221198c64625d345e1599d6c297908d6f (patch)
tree32114a27baa78b1a5c772caa012039b569fbd05d /src/compiler/GF/Grammar
parent2979864752d4f6c80089716f3e52db95785f3e37 (diff)
GF.Grammar.Canonical: pretty printer: omit some redundant brackets
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/Canonical.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/GF/Grammar/Canonical.hs b/src/compiler/GF/Grammar/Canonical.hs
index ed4f3fc9e..4adff02f2 100644
--- a/src/compiler/GF/Grammar/Canonical.hs
+++ b/src/compiler/GF/Grammar/Canonical.hs
@@ -217,6 +217,7 @@ instance Pretty LinValue where
pp lv = case lv of
ConcatValue v1 v2 -> sep [v1 <+> "++",pp v2]
ErrorValue s -> "Predef.error"<+>doubleQuotes s
+ ParamConstant pv -> pp pv
Projection lv l -> ppA lv<>"."<>l
Selection tv pv -> ppA tv<>"!"<>ppA pv
VariantValue vs -> "variants"<+>block vs
@@ -260,6 +261,7 @@ instance Pretty LinPattern where
instance PPA LinPattern where
ppA p =
case p of
+ ParamPattern pv -> ppA pv
RecordPattern r -> block r
TuplePattern ps -> "<"<>punctuate "," ps<>">"
WildPattern -> pp "_"