summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Grammar')
-rw-r--r--src/compiler/GF/Grammar/ShowTerm.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/GF/Grammar/ShowTerm.hs b/src/compiler/GF/Grammar/ShowTerm.hs
index e039aea79..7fc9ba4bf 100644
--- a/src/compiler/GF/Grammar/ShowTerm.hs
+++ b/src/compiler/GF/Grammar/ShowTerm.hs
@@ -13,6 +13,7 @@ showTerm gr style q t = render $
case style of
TermPrintTable -> vcat [p <+> s | (p,s) <- ppTermTabular gr q t]
TermPrintAll -> vcat [ s | (p,s) <- ppTermTabular gr q t]
+ TermPrintOne -> vcat [ s | (p,s) <- take 1 (ppTermTabular gr q t)]
TermPrintDefault -> ppTerm q 0 t
ppTermTabular :: SourceGrammar -> TermPrintQual -> Term -> [(Doc,Doc)]
@@ -37,4 +38,5 @@ ppTermTabular gr q = pr where
data TermPrintStyle
= TermPrintTable
| TermPrintAll
+ | TermPrintOne
| TermPrintDefault