summaryrefslogtreecommitdiff
path: root/src/compiler/GF
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2012-02-22 16:30:42 +0000
committerhallgren <hallgren@chalmers.se>2012-02-22 16:30:42 +0000
commit9ebc42300419b8844b324bc429284bbfdee36048 (patch)
treefc3c034600b39009244f76b2ef65ed8a8a22748f /src/compiler/GF
parent2312b3c9c945bc641e2d4eb3de0410e0a069e063 (diff)
gfse: experimental support for editing concrete syntax in text mode
Diffstat (limited to 'src/compiler/GF')
-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 08d70928c..9f8ee45b9 100644
--- a/src/compiler/GF/Grammar/Printer.hs
+++ b/src/compiler/GF/Grammar/Printer.hs
@@ -13,6 +13,7 @@ module GF.Grammar.Printer
, ppGrammar
, ppModule
, ppJudgement
+ , ppParams
, ppTerm
, ppPatt
, ppValue
@@ -20,6 +21,7 @@ module GF.Grammar.Printer
, ppLocation
, ppQIdent
, ppMeta
+ , getAbs
) where
import GF.Infra.Ident
@@ -107,7 +109,7 @@ ppJudgement q (id, AbsFun ptype _ pexp poper) =
ppJudgement q (id, ResParam pparams _) =
text "param" <+> ppIdent id <+>
(case pparams of
- Just (L _ ps) -> equals <+> fsep (intersperse (char '|') (map (ppParam q) ps))
+ Just (L _ ps) -> equals <+> ppParams q ps
_ -> empty) <+> semi
ppJudgement q (id, ResValue pvalue) = empty
ppJudgement q (id, ResOper ptype pexp) =
@@ -304,6 +306,7 @@ ppBind (Implicit,v) = braces (ppIdent v)
ppAltern q (x,y) = ppTerm q 0 x <+> char '/' <+> ppTerm q 0 y
+ppParams q ps = fsep (intersperse (char '|') (map (ppParam q) ps))
ppParam q (id,cxt) = ppIdent id <+> hsep (map (ppDDecl q) cxt)
ppLocation :: FilePath -> Location -> Doc