From 28a7c4b5c7659dc18166e06e914fb0a81c1c43bc Mon Sep 17 00:00:00 2001 From: krasimir Date: Tue, 8 Sep 2009 08:40:28 +0000 Subject: now the datatype Tree is only internal. All API functions are working with Expr directly. Commands gt, gr, p and rf filter out the output via the typechecker --- src/PGF/Data.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/PGF/Data.hs') diff --git a/src/PGF/Data.hs b/src/PGF/Data.hs index 6895bd335..50e11f289 100644 --- a/src/PGF/Data.hs +++ b/src/PGF/Data.hs @@ -78,3 +78,18 @@ emptyPGF = PGF { abstract = error "empty grammar, no abstract", concretes = Map.empty } + +-- | This is just a 'CId' with the language name. +-- A language name is the identifier that you write in the +-- top concrete or abstract module in GF after the +-- concrete/abstract keyword. Example: +-- +-- > abstract Lang = ... +-- > concrete LangEng of Lang = ... +type Language = CId + +readLanguage :: String -> Maybe Language +readLanguage = readCId + +showLanguage :: Language -> String +showLanguage = prCId -- cgit v1.2.3