summaryrefslogtreecommitdiff
path: root/src/PGF.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/PGF.hs')
-rw-r--r--src/PGF.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/PGF.hs b/src/PGF.hs
index 29f713c8d..bd5627668 100644
--- a/src/PGF.hs
+++ b/src/PGF.hs
@@ -42,7 +42,8 @@ module PGF(
-- * Operations
-- ** Linearization
linearize, linearizeAllLang, linearizeAll,
-
+ showPrintName,
+
-- ** Parsing
parse, canParse, parseAllLang, parseAll,
@@ -126,6 +127,9 @@ linearizeAll :: PGF -> Tree -> [String]
-- available in the grammar.
linearizeAllLang :: PGF -> Tree -> [(Language,String)]
+-- | Show the printname of a type
+showPrintName :: PGF -> Language -> Type -> String
+
-- | The same as 'parseAllLang' but does not return
-- the language.
parseAll :: PGF -> Type -> String -> [[Tree]]
@@ -237,6 +241,8 @@ linearizeAll mgr = map snd . linearizeAllLang mgr
linearizeAllLang mgr t =
[(lang,PGF.linearize mgr lang t) | lang <- languages mgr]
+showPrintName pgf lang (DTyp _ c _) = realize $ lookPrintName pgf lang c
+
parseAll mgr typ = map snd . parseAllLang mgr typ
parseAllLang mgr typ s =