summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Printer.hs
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2012-06-25 09:24:04 +0000
committeraarne <aarne@chalmers.se>2012-06-25 09:24:04 +0000
commit3dc2e55949496acd054bdb09428b4c44562ee0d0 (patch)
treeecc55ea200be754d42ba1b5acf115b4beebe5b06 /src/compiler/GF/Grammar/Printer.hs
parent43065d2ccf7936ed2609ee44e5024e4d8907f7e4 (diff)
printing ResValue judgements as comments, to provide useful information when a conflict is found between parameter constructors
Diffstat (limited to 'src/compiler/GF/Grammar/Printer.hs')
-rw-r--r--src/compiler/GF/Grammar/Printer.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/GF/Grammar/Printer.hs b/src/compiler/GF/Grammar/Printer.hs
index 9f8ee45b9..f7257751e 100644
--- a/src/compiler/GF/Grammar/Printer.hs
+++ b/src/compiler/GF/Grammar/Printer.hs
@@ -111,7 +111,10 @@ ppJudgement q (id, ResParam pparams _) =
(case pparams of
Just (L _ ps) -> equals <+> ppParams q ps
_ -> empty) <+> semi
-ppJudgement q (id, ResValue pvalue) = empty
+ppJudgement q (id, ResValue pvalue) =
+ text "-- param constructor" <+> ppIdent id <+> colon <+>
+ (case pvalue of
+ (L _ ty) -> ppTerm q 0 ty) <+> semi
ppJudgement q (id, ResOper ptype pexp) =
text "oper" <+> ppIdent id <+>
(case ptype of {Just (L _ t) -> colon <+> ppTerm q 0 t; Nothing -> empty} $$